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 incorrect throw of exception in global tracer assignment #9587

Merged
merged 1 commit into from
Dec 11, 2024

Conversation

tjquinno
Copy link
Member

@tjquinno tjquinno commented Dec 11, 2024

Description

Resolves #9586

The OpenTelemetry tracing provider code correctly checks the runtime type of the parameter before accepting it. But after setting the global tracer that branch failed to return or otherwise skip the code which throws the exception for a mismatch of the type.

The PR just adds a return after the successful type check and assignment of the global tracer, skipping the line that throws the exception.

The PR also adds a test.

Documentation

No impact.

@tjquinno tjquinno self-assigned this Dec 11, 2024
@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Dec 11, 2024
@barchetta barchetta mentioned this pull request Dec 11, 2024
17 tasks
@tjquinno tjquinno merged commit 1e423dd into helidon-io:main Dec 11, 2024
46 checks passed
@tjquinno tjquinno deleted the 4.x-tracing-global-exc branch December 11, 2024 20:38
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.

4.x Assigning Tracer.global(tracer) with the OpenTelemetry provider throws a spurious exception
2 participants