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
|
# - 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
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user