fix(opentelemetry): add resource attributes for application and environment in log transformation
Signed-off-by: zhenyus <zhenyus@mathmast.com>
This commit is contained in:
parent
473f5cea54
commit
c08ddf7f76
@ -43,6 +43,14 @@ spec:
|
||||
# - k8s.deployment.uid
|
||||
# - k8s.namespace.name
|
||||
# - k8s.node.name
|
||||
# resource:
|
||||
# attributes:
|
||||
# - action: upsert
|
||||
# key: application
|
||||
# from_attribute: context.app
|
||||
# - action: upsert
|
||||
# key: environment
|
||||
# from_attribute: context.env
|
||||
transform:
|
||||
log_statements:
|
||||
- context: log
|
||||
@ -50,7 +58,6 @@ spec:
|
||||
- set(log.body["kubernetes"], log.attributes["kubernetes"])
|
||||
- set(resource.attributes["application"], log.attributes["context"]["app"])
|
||||
- set(resource.attributes["environment"], log.attributes["context"]["env"])
|
||||
- context
|
||||
batch:
|
||||
send_batch_size: 5
|
||||
timeout: 10s
|
||||
|
||||
Loading…
Reference in New Issue
Block a user