Skip to content

Conversation

@sdelamo
Copy link
Contributor

@sdelamo sdelamo commented Jun 19, 2025

see: micronaut-projects/micronaut-azure#857
NewSpanOpenTelemetryTraceInterceptor uses io.opentelemetry.instrumentation.api.incubator.semconv.util.ClassAndMethod.That class comes from: io.opentelemetry.instrumentation:opentelemetry-instrumentation-api-incubator:2.16.0-alpha

It does not define a @Requires to that class.

However, that dependency is resolved right now as a transitive dependency of the opentelemetry-aws-sdk compileOnly dependency:

   +--- io.opentelemetry.instrumentation:opentelemetry-aws-sdk-2.2:2.16.0-alpha (c)
|    \--- io.opentelemetry.instrumentation:opentelemetry-instrumentation-api-incubator:2.16.0-alpha (c)

I see two solutions:

  • We annotate NewSpanOpenTelemetryTraceInterceptor with @Requires(ClassAndMethod.class)

  • We define the instrumentation.api.incubator dependency explicitly.

This PR adds the dependency.

see: micronaut-projects/micronaut-azure#857
`NewSpanOpenTelemetryTraceInterceptor` uses `io.opentelemetry.instrumentation.api.incubator.semconv.util.ClassAndMethod`.That class comes from: `io.opentelemetry.instrumentation:opentelemetry-instrumentation-api-incubator:2.16.0-alpha`

 It does not define a `@Requires` to that class.

However, that dependency is resolved right now as a transitive dependency of the `opentelemetry-aws-sdk` compileOnly dependency:

```
   +--- io.opentelemetry.instrumentation:opentelemetry-aws-sdk-2.2:2.16.0-alpha (c)
|    \--- io.opentelemetry.instrumentation:opentelemetry-instrumentation-api-incubator:2.16.0-alpha (c)
```

I see two solutions:

A) We annotate `NewSpanOpenTelemetryTraceInterceptor` with `@Requires(we either define an `@Requires(ClassAndMethod.clasS)`
B) We define the instrumentation.api.incubator dependency explicitly.

This PR adds the dependency.
@sdelamo sdelamo requested review from burtbeckwith and n0tl3ss June 19, 2025 15:09
@sdelamo sdelamo added the type: bug Something isn't working label Jun 19, 2025
@sdelamo sdelamo moved this to Ready for Review in 4.9.0 Release Jun 19, 2025
@sdelamo sdelamo merged commit 505c7b8 into 7.1.x Jun 19, 2025
1 of 4 checks passed
@sdelamo sdelamo deleted the instrumentator-api branch June 19, 2025 15:18
@github-project-automation github-project-automation bot moved this from Ready for Review to Done in 4.9.0 Release Jun 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: bug Something isn't working

Projects

No open projects
Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants