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

Fix problems with tracing data propagation #8742

Merged
merged 2 commits into from May 17, 2024

Conversation

tjquinno
Copy link
Member

@tjquinno tjquinno commented May 9, 2024

Description

Resolves #8722

Several problems:

  1. The OpenTelemetry tracing provider library lacked an implementation of DataPropagationProvider. As a result, OTel-based tracing information was never propagated via context.
  2. The TracingObserver registered only the SpanContext in the context, not also the Span and Tracer. The existing Jaeger data propagation provider and the new one for OTel need to retrieve the Span from the context so we can re-establish that span as the active span during a runInContext.
  3. The original Jaeger data propagation provider propagateData method incorrectly used the current span rather than the span captured in the JaegerContext object earlier. The analogous code in the new OpenTelemetryDataPropagationProvider uses the saved context instead and the analogous Jaeger type now extends that OTel implementation.

Because Jaeger relies on OTel, the Jaeger and the OTel propagation providers are virtually identical. This PR makes the Jaeger one a subclass of the new OTel one to avoid duplicating the code.

Documentation

Bug fix; no doc impact.

Signed-off-by: Tim Quinn <tim.quinn@oracle.com>
@tjquinno tjquinno self-assigned this May 9, 2024
@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label May 9, 2024
@tjquinno tjquinno merged commit 9544c36 into helidon-io:main May 17, 2024
12 checks passed
@tjquinno tjquinno deleted the 4.x-otel-prop branch May 17, 2024 22:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OCA Verified All contributors have signed the Oracle Contributor Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Contexts#wrap(ExecutorService) doesn't propagate OTEL span
2 participants