How to set resource attribute "service.name" from log record attribute? #36404
Replies: 1 comment
-
Using the transform processor kind of works. The following configuration does set the service name. Somewhere in the processing of the log files the wrong service.names are set. I end up getting the wrong log lines attached to I am also not sure how to debug this correctly.
The filelog receiver is configured to be able to look into every log file of any container. As I have multple containers running the value in "attributes["attrs"]["tag"]" differs depending on from which container it is set.
Many thanks! |
Beta Was this translation helpful? Give feedback.
-
Hi,
I have kind of similar question like already asked in #35883. But there are some key differences so I opened a new discussion.
I am not able to set the resource attribute "service.name" as it seems to me that the resource attribute processor is not able to grab attributes from log records.
I have following (shortend) otel-collector config
And here is a sample log line:
And some debug output from the transform processor:
So the transform processor is working as intended i guess? Atleast it finds the
attributes["attrs"]["tag"]
and createsmy.service
correctly.However the resource processor is not able to pick it up. How can I achieve that?
Many thanks.
Beta Was this translation helpful? Give feedback.
All reactions