How to use W3CTraceContextPropagator to read the traceID from header #6968
Replies: 2 comments
-
If using automatic instrumentation then, the OTel Java agent injects information about the current span into each logging
These can be included in log statements produced by the logging library logging.pattern.level = trace_id=%mdc{trace_id} span_id=%mdc{span_id} trace_flags=%mdc{trace_flags} %5p |
Beta Was this translation helpful? Give feedback.
-
@arunprakashpj , I'm not sure if you are able to get it done automatically ? Even I have a similar situation of processing CloudEvents in a spring boot application. As of now, I think there is no auto-instrumentation support for CloudEvents in OpenTelemetry Java Agent (See, supported-libraries). For e.g. as of today based on the For my app, I tried to handle producer and consumer spans manually based on the current experimental spec: CloudEvents OTel. Because, the spans are manually created using OpenTelemetry API, the logging fields
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
As of now we are sending a trace parent ( ‘traceparent: 00-xxxxxxxxxxxxxxxxxxxxxx-yyyyyyyyyyyy-01’) from cloud events, and we expect open telemetry to print the console logs with trace IDs and span Ids based on the header.
How to make use of the automatic instrumentation to print trace IDs and span IDs in console logs of the spring boot app ? The trace ID has to be automatically fetched from trace parent initially.
Beta Was this translation helpful? Give feedback.
All reactions