Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenTelemetry: Can't get trace/parent/span Ids in Quarkus logs #26804

Closed
NMichas opened this issue Jul 19, 2022 · 4 comments
Closed

OpenTelemetry: Can't get trace/parent/span Ids in Quarkus logs #26804

NMichas opened this issue Jul 19, 2022 · 4 comments
Labels

Comments

@NMichas
Copy link

NMichas commented Jul 19, 2022

Describe the bug

I'm following the example in https://quarkus.io/guides/opentelemetry to configure OpenTelemetry in my Quarkus service. The integration works fine and I can see the spans in Jaeger UI.

However, Quarkus logs don't include information on the tracing context, i.e.

 09:53:37 INFO  traceId=, parentId=, spanId=, sampled= [or.ac.HelloWorld] (executor-thread-0) Hello world executed.

Is there some configuration I might be missing? I've made a tiny project below if you want to see this in action.

Expected behavior

Logs populated with tracing context info.

Actual behavior

Logs not populated with tracing context info:

 09:53:37 INFO  traceId=, parentId=, spanId=, sampled= [or.ac.HelloWorld] (executor-thread-0) Hello world executed.

How to Reproduce?

See the project in:
https://github.com/NMichas/quarkus-opentelemetry

Output of uname -a or ver

No response

Output of java -version

No response

GraalVM version (if different from Java)

No response

Quarkus version or git rev

No response

Build tool (ie. output of mvnw --version or gradlew --version)

No response

Additional information

No response

@NMichas NMichas added the kind/bug Something isn't working label Jul 19, 2022
@quarkus-bot
Copy link

quarkus-bot bot commented Jul 19, 2022

/cc @Ladicek, @radcortez

@tellisnz-shift
Copy link

tellisnz-shift commented Jul 20, 2022

I upgraded to 2.11.0.CR1 and I can see them, I think it's this fix: #26258

Although in dev mode a live reload (i.e.. hit s) will cause OTEL to stop exporting and them to be traceId: '00000000000000000000000000000000' parentId: '' spanId: '0000000000000000' sampled: 'false'
and a rerun of tests (i.e. hit r) will cause OTEL to stop exporting and them to be traceId: '' parentId: '' spanId: '' sampled: ''

Need to fully restart quarkus dev to get them back.

@NMichas
Copy link
Author

NMichas commented Jul 20, 2022

Thanks, 2.11.0.CR1 fixes it, closing this one in favour of #26258.

@famod
Copy link
Member

famod commented Dec 2, 2022

Although in dev mode a live reload (i.e.. hit s) will cause OTEL to stop exporting and them to be traceId: '00000000000000000000000000000000' parentId: '' spanId: '0000000000000000' sampled: 'false' and a rerun of tests (i.e. hit r) will cause OTEL to stop exporting and them to be traceId: '' parentId: '' spanId: '' sampled: ''

Need to fully restart quarkus dev to get them back.

FWIW, I have created #29645 for that specific problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants