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

4.x Adopt MP Telemetry 1.1 #8984

Merged
merged 8 commits into from
Aug 3, 2024

Conversation

tjquinno
Copy link
Member

@tjquinno tjquinno commented Jul 15, 2024

Description

Resolves #8728

Major changes by component:

  • Dependencies
    • MP Tel to 1.1
    • OTel to 1.29.0
    • OTel semantic conventions to 1.29.0-alpha.
  • MP telemetry
    • Helidon now adds additional tags to spans (HTTP_ROUTE, NET_PEER_NAME, NET_PEER_PORT) as required by MP Telemetry 1.1.

    • Helidon now sets the span status in accordance with the OpenTelemetry semantic conventions. See https://opentelemetry.io/docs/specs/semconv/http/http-spans/#status.

    • The more recent OTel semantic conventions require the HTTP method to be in the span name for REST spans. https://opentelemetry.io/docs/specs/semconv/http/http-spans/#name This is a backward-incompatible change from MP Telemetry 1.0 and, therefore, earlier releases of Helidon 4.0.x.

      For backward compatibility with earlier releases of 4.0.x, Helidon does not by default include the HTTP method in REST span names. In this case Helidon displays a warning during start-up that the behavior is deprecated.

      Users can choose the newer, spec-compliant but backward-incompatible behavior by setting the Helidon-specific mp.telemetry.span.name-includes-method config property to true.

      The PR includes a new unit test which exercises the config setting.

    • Using

      @Inject 
      private Span span;
      

      was apparently always intended to provide access to the span that is current at the time of use, not the current span at the time of injection. This is now checked in the TCK and Helidon now conforms.

  • Helidon telemetry TCK driver
    • The new TCK contains optional tests that rely on Jakarta concurrency and work only if the MP implementation under test uses that. Helidon does not so we skip those tests.
  • OpenTelemetry tracing provider
    • OTel supports baggage metadata for each baggage entry. The MP Telemetry TCK now tests for that. To support that the Helidon tracing WritableBaggage API now supports a set(key, value, metadataString) method which defaults to this.set(key, value, "") The OTel tracing provider now deals with baggage metadata; the other providers ignore metadata.

Documentation

This PR adds a note to the MP telemetry page about the REST span naming incompatibility and the config option to use the newer format.

@tjquinno tjquinno self-assigned this Jul 15, 2024
@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Jul 15, 2024
@tomas-langer tomas-langer added the dependencies Pull requests that update a dependency file label Aug 3, 2024
@tomas-langer tomas-langer requested a review from barchetta August 3, 2024 10:26
@tjquinno tjquinno merged commit 4f73c0b into helidon-io:main Aug 3, 2024
12 checks passed
@tjquinno tjquinno deleted the 4.x-adopt-mp-telemetry-1.1 branch August 3, 2024 18:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file OCA Verified All contributors have signed the Oracle Contributor Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

MicroProfile Telemetry 1.1
2 participants