refactor(opentelemetry): reorganize log transformation logic for clarity and consistency

Signed-off-by: zhenyus <zhenyus@mathmast.com>
This commit is contained in:
zhenyus 2025-04-21 16:42:28 +08:00
parent 2e1879298f
commit 5f1742e22e

View File

@ -66,17 +66,13 @@ spec:
# - action: insert # - action: insert
# key: kubernetes.node_name # key: kubernetes.node_name
# from_attribute: k8s.node.name # from_attribute: k8s.node.name
- action: insert transform:
key: app log_statements:
from_attribute: context.app - context: log
- action: insert statements:
key: environment - set(log.body["kubernetes"], log.attributes["kubernetes"])
from_attribute: context.env - set(log.attributes["app"], log.attributes["context"].app)
# transform: - set(log.attributes["environment"], log.attributes["context"].env)
# log_statements:
# - context: log
# statements:
# - set(log.body["kubernetes"], log.attributes["kubernetes"])
batch: batch:
send_batch_size: 5 send_batch_size: 5
timeout: 10s timeout: 10s