Uploaded image for project: 'Quarkus'
  1. Quarkus
  2. QUARKUS-5668

Add ability to exclude URIs from OpenTelemetry Tracing

XMLWordPrintable

        1. What

      This pull request creates a new `BuildItem` that is used for drop uri from tracing when using `quarkus-opentelemetry` extension. The `DropApplicationUrisBuildItem` is generated from the scanning of the `@Traceless` annotation.

      The `@Traceless` annotation is used with the `jakarta.ws.rs.Path` annotation. If annotated at class level all uri below will be ignored for tracing.

      If your `@Path` annotation contains expression like `@Path("/cars/

      {carId}

      ")` the extension will ignore all thing after `cars` using, e.g. `cars*`.

        1. Why

      You can see the issue below, or directly this [Stackoverflow](https://stackoverflow.com/questions/78742740/how-to-disable-trace-ids-for-specific-rest-clients-invocations/78748952) discussion.

      Fixes #42659

      Upstream documentation: https://quarkus.io/guides/opentelemetry-tracing#disabling-traces-for-app-endpoints
      Test plan: https://github.com/quarkus-qe/quarkus-test-plans/blob/main/QUARKUS-5668.md

              Unassigned Unassigned
              blafond Barry LaFond
              Michal Jurc Michal Jurc
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: