Skip to content

Conversation

@jaydeluca
Copy link
Member

Part of #14096

display_name: JAX-RS 1.x
description: |
This instrumentation enables spans for JAX-RS methods, and enriches existing HTTP server spans with route information.
This instrumentation enriches HTTP server spans with route information and enables controller spans for JAX-RS annotated methods (this instrumentation is disabled by default).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

JAX-RS 2.x uses a slightly different wording controller spans are disabled by default which I think is better

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually I don't know this instrumentation is disabled by default is also totally correct, your choice which you wish to use.

Copy link
Member Author

@jaydeluca jaydeluca Oct 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is where i am getting the "disabled by default" from: https://github.com/open-telemetry/opentelemetry-java-instrumentation/blob/main/instrumentation/jaxrs/jaxrs-1.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/jaxrs/v1_0/JaxrsInstrumentationModule.java#L44

Some of these JAX ones just use the controllerTelemetryEnabled flag to disable the instrumenter, while others also use this flag in the defaultEnabled method.

With that being said, you are right that this doesn't follow the pattern used elsewhere, i think it makes sense to switch to controller spans are disabled by default, and just use the disabled_by_default attribute for the other piece

@laurit laurit enabled auto-merge (squash) October 30, 2025 14:01
@laurit laurit merged commit 45735e6 into open-telemetry:main Oct 30, 2025
89 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants