fix(opentelemetry): correct syntax for accessing context attributes in log transformation

Signed-off-by: zhenyus <zhenyus@mathmast.com>
This commit is contained in:
zhenyus 2025-04-21 16:43:24 +08:00
parent 5f1742e22e
commit b0a1e56a75

View File

@ -71,8 +71,8 @@ spec:
- context: log - context: log
statements: statements:
- set(log.body["kubernetes"], log.attributes["kubernetes"]) - set(log.body["kubernetes"], log.attributes["kubernetes"])
- set(log.attributes["app"], log.attributes["context"].app) - set(log.attributes["app"], log.attributes["context"]["app"])
- set(log.attributes["environment"], log.attributes["context"].env) - set(log.attributes["environment"], log.attributes["context"]["env"])
batch: batch:
send_batch_size: 5 send_batch_size: 5
timeout: 10s timeout: 10s