Span linking during redirects

39 Views Asked by At

I'm currently working on implementing an OAuth2 authentication system utilizing the code grant flow. However, I'm encountering an issue with span linking during redirects. I'm using Quarkus 3.6.0 along with the latest OpenTelemetry.

The challenge I'm facing is that every redirect in the code flow seems to create its own span, resulting in separate tracks and new traceId flows. I'm striving to maintain continuity across these redirects, ensuring that all spans remain under one trace. This is essential for comprehensive visibility within tracing systems like Zipkin or Jaeger.

Adding the traceparent header manually doesn't seem to link the spans together. Instead, it creates a new span that attaches to the base process as the last one before initiating a new trace for the required endpoint. Unfortunately, this new span lacks necessary tags or information.

In essence, I'm seeking guidance or suggestions on how to link one span with another, ensuring the retrieval of all the essential tags throughout the OAuth2 authentication flow amidst redirects.

Has anyone encountered a similar issue or found a solution to maintain continuity in spans across redirects in an OAuth2 flow?

Your insights or ideas would be immensely helpful. Thanks in advance for your assistance!

0

There are 0 best solutions below