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

Use Helidon tracer, span builder, span types instead of OTel ones so we can trigger span listeners #8778

Merged
merged 10 commits into from
May 24, 2024

Conversation

tjquinno
Copy link
Member

@tjquinno tjquinno commented May 17, 2024

Description

Resolves #8774
Resolves #8370

The Helidon MP telemetry handling of the @WithSpan annotation used the OTel types (tracer, span, and span builder). This made sense initially because @WithSpan is an OpenTelemetry annotation.

Similarly, our container and client filters for setting the correct span context used the OTel types.

But recently we added support for span listeners, and the listeners are invoked from the Helidon wrappers around the various tracing implementations. Because the code that handled @WithSpan and the two filters all used the OTel types directly instead of the Helidon wrappers the listeners were not invoked for spans created due to @WithSpan or the filters.

The main changes in this PR:

Testing changes:

  • Addition of a new test to make sure that listeners are invoked for spans triggered by @WithSpan.
  • Addition of a new test to make sure that the parent span is set automatically when there is a current one and that the OTel SpanBuilder#setNoParent method works as a way to create a root span.

Documentation

This is a bug fix and has no doc impact.

@tjquinno tjquinno self-assigned this May 17, 2024
@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label May 17, 2024
@tjquinno tjquinno force-pushed the 4.x-withspan-listeners-fix branch from 6f26904 to e02cd56 Compare May 17, 2024 23:39
@tjquinno tjquinno marked this pull request as draft May 20, 2024 22:01
@tjquinno tjquinno force-pushed the 4.x-withspan-listeners-fix branch from 92d6286 to 06ac395 Compare May 22, 2024 19:27
@tjquinno tjquinno marked this pull request as ready for review May 22, 2024 20:25
@tjquinno tjquinno merged commit 19edc8b into helidon-io:main May 24, 2024
12 checks passed
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
2 participants