Skip to content

Span.currentSpan() returns a span whose Trace's id is 00000000000000000000000000000000 instead of the actual current trace's id #12217

Closed Answered by laurit
yatamraghu7 asked this question in Q&A
Discussion options

You must be logged in to vote

As you can see below screen shot I am missing the traceId and spanId from MDC

You won't be able to get the trace id with MDC.get("trace_id"). Have a look at the instrumentation in https://github.com/open-telemetry/opentelemetry-java-instrumentation/tree/main/instrumentation/logback/logback-mdc-1.0/library You'll see that the trace id isn't really added to the MDC but to the copy of MDC that is attached to the logging event.

and also the response from SERVER side also not appending the traceId and spanId to the log statement

I have no idea what you mean by that. If you mean that it is missing from stuff logged by LoggingSpanExporter then that is expected.
Overall to me it seems that tr…

Replies: 3 comments 16 replies

Comment options

You must be logged in to vote
4 replies
@yatamraghu7
Comment options

@laurit
Comment options

@yatamraghu7
Comment options

@laurit
Comment options

Comment options

You must be logged in to vote
12 replies
@yatamraghu7
Comment options

@yatamraghu7
Comment options

@yatamraghu7
Comment options

@laurit
Comment options

Answer selected by yatamraghu7
@yatamraghu7
Comment options

@laurit
Comment options

@yatamraghu7
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants