Context propagation is not working correctly when using Netflix DGS on a reactive stack #1473
denniseffing
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi all!
I am currently in the process of migrating our Spring Boot services using Netflix DGS to Spring Boot 3. I encountered a lot of small issues I could work around but the one thing I could not get to work correctly is tracing.
I actually managed generating correct traces and spans for GraphQL request by following the instrumentation docs and by following the take aways of the Spring blog posts mentioned above.
My application:
Hooks.enableAutomaticContextPropagation()
to enable automatic context propagationGraphQlObservationInstrumentation
of the Spring GraphQL project to instrument tracing for GraphQL requests & DataFetchersThings that work
Things that don't work
Screenshot of generated trace visualized in Zipkin:
Logs of the request:
As you can see when comparing the screenshot and the logs, the logs contain the span ID of the parent span (demo-app: graphql field test-object), but not the span ID of the data fetcher span (demo-app: graphql field test-object).
Also, the Netflix DGS exception handler doesn't have access to the tracing context. Not sure what is going on here, even after reading the newest blog articles regarding the context propagation functionality in Spring Boot and Project Reactor:
Does anyone have an idea what is going on here?
Looking forward to your feedback!
Best regards,
Dennis
Beta Was this translation helpful? Give feedback.
All reactions