Skip to content

GraphQL Instrumentation: Obtaining traceId from Active Context / Setting Active Context #2019

Answered by vmarchaud
mannyluvstacos asked this question in Q&A
Discussion options

You must be logged in to vote

The issue is that you didn't register the node sdk, so the context manager that makes everything work isn't enabled. You just need to add:

tracerProvider.register()

After this line and it should works (both for using getSpan and getting the traceId from the spanContext.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@mannyluvstacos
Comment options

Answer selected by mannyluvstacos
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