open-telemetry / opentelemetry-java

OpenTelemetry Java SDK
https://opentelemetry.io
Apache License 2.0
1.97k stars 817 forks source link

Is there plan to switch `javax.annotation` to `jakarta.annotation` namespace? #6510

Open chukunx opened 3 months ago

chukunx commented 3 months ago

Is your feature request related to a problem? Please describe.

In Jakarta EE 9, the javax.annotation namespace from the javax.annotation:javax.annotation-api:1.3.2 has been changed to jakarta.annotation. Referencing the javax.annotation namespace adds complexity for application to switch over to the new namespace.

https://github.com/open-telemetry/opentelemetry-java/blob/be25f4ef0cedd42e27f5d88d3bb89606aa20f592/dependencyManagement/build.gradle.kts#L56

Describe the solution you'd like

Introduces the jakarta.annotation:jakarta.annotation-api:2.0.0 and produces artifacts that uses this package.

jkwatson commented 3 months ago

This is only used as a compileOnly dependency in order for the linter to be able to identify generated code. I don't think it's much of a problem to depend on it. No application should ever have to take on this dependency transitively.

Have you run into an actual issue with this?