refactor(opentelemetry): reorganize log transformation logic for clarity and consistency
Signed-off-by: zhenyus <zhenyus@mathmast.com>
This commit is contained in:
parent
2e1879298f
commit
5f1742e22e
@ -66,17 +66,13 @@ spec:
|
||||
# - action: insert
|
||||
# key: kubernetes.node_name
|
||||
# from_attribute: k8s.node.name
|
||||
- action: insert
|
||||
key: app
|
||||
from_attribute: context.app
|
||||
- action: insert
|
||||
key: environment
|
||||
from_attribute: context.env
|
||||
# transform:
|
||||
# log_statements:
|
||||
# - context: log
|
||||
# statements:
|
||||
# - set(log.body["kubernetes"], log.attributes["kubernetes"])
|
||||
transform:
|
||||
log_statements:
|
||||
- context: log
|
||||
statements:
|
||||
- set(log.body["kubernetes"], log.attributes["kubernetes"])
|
||||
- set(log.attributes["app"], log.attributes["context"].app)
|
||||
- set(log.attributes["environment"], log.attributes["context"].env)
|
||||
batch:
|
||||
send_batch_size: 5
|
||||
timeout: 10s
|
||||
|
||||
Loading…
Reference in New Issue
Block a user