You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello everyone !,
Recently I had experimented with OTLP for learning I had try on using Opentelemetry auto-Instrument for tracing + logs. I would like to reference field from OTEL Logs format below as you can see in my picture field was inside "scopeLogs[1].logRecords[0].body.stringValue"
The reason I want to extract Logs field because I may have important data in that Logs Field which is printing at Standard Output but Tracing context was not had sufficient Business data.
Now I can tracing technical stuff like HTTP Method, Path, Container Name, Kubernetes detail which is quite awesome however I would like to inject my additional business context which is useful for Business Monitoring rather than IT Perspective only.
As you can see here in my Logs Output "Art Transaction=1234567890 I want reference this field from Tracing Scope"
I would like to adding Logs value of that field to my Opentelemetry Resource Field with my Customize Metadata.
So if I had very long verbose logs information I may strip message by regex and create new field at Resource Level like
customLogsField derived data from some Regex pattern.
artID Resource field derived data from some Regex pattern.
Currently I had no problem on changing/ modifying Resource Context on Tracing I can delete Resouce Field that I don't want to use on Tracing perfectly fine but I don't known How can I reference Message from Logs then set it to Tracing Context for Resource or Span context.
The end result that I just mockup should look like this one.
In picture we can using our OTEL Collector Processor to reference Logs Message then put it back to Tracing Resource Context.
Hello @wdrdres3qew5ts21, there is currently no way to do this. Each type of data has its own data pipeline, which is the essentially the scope of access in the collector. This means that a pipeline for traces won't have any knowledge of a separate pipeline for logs.
The best option for your use case would be to add the information directly to the trace itself. This would be specific to your use case, so if you'd like more information a specific configuration and use case would be very helpful.
Component(s)
No response
Describe the issue you're reporting
Hello everyone !,
Recently I had experimented with OTLP for learning I had try on using Opentelemetry auto-Instrument for tracing + logs. I would like to reference field from OTEL Logs format below as you can see in my picture field was inside "scopeLogs[1].logRecords[0].body.stringValue"
The reason I want to extract Logs field because I may have important data in that Logs Field which is printing at Standard Output but Tracing context was not had sufficient Business data.
Now I can tracing technical stuff like HTTP Method, Path, Container Name, Kubernetes detail which is quite awesome however I would like to inject my additional business context which is useful for Business Monitoring rather than IT Perspective only.
As you can see here in my Logs Output "Art Transaction=1234567890 I want reference this field from Tracing Scope"
I would like to adding Logs value of that field to my Opentelemetry Resource Field with my Customize Metadata.
So if I had very long verbose logs information I may strip message by regex and create new field at Resource Level like
Currently I had no problem on changing/ modifying Resource Context on Tracing I can delete Resouce Field that I don't want to use on Tracing perfectly fine but I don't known How can I reference Message from Logs then set it to Tracing Context for Resource or Span context.
The end result that I just mockup should look like this one.
In picture we can using our OTEL Collector Processor to reference Logs Message then put it back to Tracing Resource Context.
I had try many thing follow from transformprocessor but it seem like didn't work. Most of them only work on Tracing Scope but cannot Reference Logs Message from Tracing Scop
https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/processor/transformprocessor#move-field-to-attribute
Thank you so much for helping !
The text was updated successfully, but these errors were encountered: