Skip to content

Conversation

@zeitlinger
Copy link
Member

No description provided.

@zeitlinger zeitlinger self-assigned this Jan 6, 2026
@zeitlinger zeitlinger requested a review from a team as a code owner January 6, 2026 14:45
@github-actions github-actions bot added the test native This label can be applied to PRs to trigger them to run native tests label Jan 6, 2026
Copy link
Member

@trask trask left a comment

Choose a reason for hiding this comment

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

I'm wondering if we even need these:

  • otel.instrumentation.common.default-enabled
  • otel.instrumentation.xyz.enabled

now that we have:

tracer_provider:
  tracer_configurator/development:
    default_config:
      disabled: true
    tracers:
      - name: io.opentelemetry.okhttp*
        config:
          disabled: false

@laurit
Copy link
Contributor

laurit commented Jan 7, 2026

I'm wondering if we even need these:

I think we still need to be able to disable individual instrumentations. For example imagine that instrumentation has a bug or does expensive class matching, then just disabling the tracer won't be enough. As for disabling all instrumentations with default-enabled I have never liked it much, but I'm sure we'd get a ton of requests for an option to let users selectively enable instrumentations if we'd remove this option.

Copy link
Contributor

@laurit laurit left a comment

Choose a reason for hiding this comment

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

I don't quite get why the default enabled couldn't be a simple boolean.

@zeitlinger
Copy link
Member Author

I don't quite get why the default enabled couldn't be a simple boolean.

we wanted to allow for future values live "all", "minimal" or similar

@zeitlinger
Copy link
Member Author

I think we still need to be able to disable individual instrumentations. For example imaging that instrumentation has a bug or does expensive class matching, then just disabling the tracer won't be enough.

I agree

@trask
Copy link
Member

trask commented Jan 7, 2026

For example imaging that instrumentation has a bug or does expensive class matching, then just disabling the tracer won't be enough.

Should we scope these configuration options to the java agent then (under the agent distro node in declarative configuration)? We could restructure our general recommendations around using tracer config, while preserving this as an advanced java agent configuration.

@zeitlinger
Copy link
Member Author

Should we scope these configuration options to the java agent then (under the agent distro node in declarative configuration)? We could restructure our general recommendations around using tracer config, while preserving this as an advanced java agent configuration.

The reason for the current design is that it allows native instrumentation to use the properties in a natural way.
Having tracer config in the SDK for a similar purpose is an additional argument to have this as a shared setting IMO.

@trask
Copy link
Member

trask commented Jan 7, 2026

The reason for the current design is that it allows native instrumentation to use the properties in a natural way.

why does native instrumentation need to access these configuration options?

@zeitlinger
Copy link
Member Author

zeitlinger commented Jan 7, 2026

why does native instrumentation need to access these configuration options?

for the same reason as in agent: disabling when it's broken

@trask
Copy link
Member

trask commented Jan 7, 2026

I'm not sure that's an important use case outside of the Java agent (which needs it due to it being zero code, and due to the problems inherent in using bytecode instrumentation)

@zeitlinger
Copy link
Member Author

I'm not sure that's an important use case outside of the Java agent (which needs it due to it being zero code, and due to the problems inherent in using bytecode instrumentation)

good point - I've created #15796 to continue the discussion.

This PR can be done first I think.

@trask
Copy link
Member

trask commented Jan 8, 2026

This PR can be done first I think.

this PR seems unnecessary if we are going forward with #15796

also, I think we could reconsider whether we really need a multi-state "mode" or if boolean is good enough

@zeitlinger
Copy link
Member Author

also, I think we could reconsider whether we really need a multi-state "mode" or if boolean is good enough

let's go back to boolean then.

I'll add a design proposal to #15796

@zeitlinger zeitlinger marked this pull request as draft January 9, 2026 08:20
@zeitlinger zeitlinger closed this Jan 9, 2026
@zeitlinger zeitlinger deleted the instrumentation-mode branch January 9, 2026 14:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test native This label can be applied to PRs to trigger them to run native tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants