Junze
06/27/2025, 6:41 PM{"time":"2025-06-27T183417.891659338+00:00","level":"INFO","msg":"everything ready","request_id":"0197b2ab-4397-7958-ac3d-d307b6001ace","operation":"is-ready","method":"GET","path":"/v0/ready","trace_id":"1bf8bd7b774805451aa97975094510f6"}I'd like to lift the
msg field to the otel Body field and level to the SeverityText and have the rest fields as LogAttributes, the metadata from kubernetes filter would be ResourceAttributes. I tried to use the opentelemetry and content_modifier processor with the new yaml config, but it looks like the upsert action can only take static values? For example my config below wouldn't take the value of field path in the LogAttributes or setting service.name correctly in the resource attributes
processors:
logs:
- name: kubernetes
kube_tag_prefix: kube.
regex_parser: kube-tag
merge_log: On
keep_log: Off
buffer_size: 68k
- name: opentelemetry_envlope
- name: content_modifier
context: attributes
action: upsert
key: path
value: $path
- name: content_modifier
context: otel_resource_attributes
action: upsert
key: service.name
value: ${kubernetes.labels['app.kubernetes.io/name']}
Curious to know how you are configuring fluent-bit for otel?Pat
06/28/2025, 3:39 PMPat
06/28/2025, 3:40 PMJunze
06/30/2025, 7:52 AMopentelemetry_envlope processor as you can see in my config, but I struggle to combine it with the kubernetes filter where i'm expecting some k8s metadata to be in LogAttributes and others ResourceAttributesPat
06/30/2025, 9:07 AMPat
06/30/2025, 9:08 AM${VAR} will expect a variable to be set but you're trying to reference another field which should just be $fieldPat
06/30/2025, 9:10 AM$kubernetes['labels']['app.kubernetes.io/name']
However, I'd probably just set up a new key with another filter first to simplify that and then reference a single key - if you do it with a LUA script then you can also cope with defaulting or missing valuesJunze
06/30/2025, 9:33 AM$path there as well just to test both syntax. so are you saying the value field of a filter/processor supports record accessor syntax too? i thought it was only the keyPat
06/30/2025, 9:43 AMPat
06/30/2025, 9:43 AMPat
06/30/2025, 9:44 AMPat
06/30/2025, 9:46 AMhhatake
06/30/2025, 9:50 AMJunze
06/30/2025, 9:56 AMJunze
07/17/2025, 9:19 AMprocessor_content_modifier? I think it only makes sense when RA is supported there coz we don't want to hard code values in the configPat
07/17/2025, 9:20 AMJunze
07/17/2025, 9:22 AMPat
07/17/2025, 9:22 AMPat
07/17/2025, 9:22 AMJunze
07/17/2025, 9:22 AMmodify filter