opentelemetry-python icon indicating copy to clipboard operation
opentelemetry-python copied to clipboard

Use all installed resource detectors by default & remove `OTEL_EXPERIMENTAL_RESOURCE_DETECTORS` env var

Open bschoenmaeckers opened this issue 1 month ago • 3 comments

Is your feature request related to a problem?

Currently we rely on the environment variable OTEL_EXPERIMENTAL_RESOURCE_DETECTORS to enable resource detectors. This unfortunately requires manual listing all installed resource detectors that are installed to enable them. Which does not have the usability comfort of other auto-instrumentation components.

Describe the solution you'd like

I would love to see that all detectors are enabled by default when installed like the instrumentation libraries.

Describe alternatives you've considered

setting OTEL(_EXPERIMENTAL)_RESOURCE_DETECTORS to all

An alternative option is to allow setting the env var to the value all. On which all resource detectors will be loaded.

Additional Context

No response

Would you like to implement a fix?

Yes

Tip

React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding +1 or me too, to help us triage it. Learn more here.

bschoenmaeckers avatar Nov 21 '25 14:11 bschoenmaeckers

The plan was to move all the attributes to the default OTELResourceDetector as they are marked stable. In the meantime I think all may be a good workaround. Let's see if anyone has opinions.

xrmx avatar Nov 21 '25 15:11 xrmx

What about * instead of all to be consistent with OTEL_PYTHON_DISABLED_INSTRUMENTATIONS? (https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3967)

tammy-baylis-swi avatar Nov 26 '25 17:11 tammy-baylis-swi

What about * instead of all to be consistent with OTEL_PYTHON_DISABLED_INSTRUMENTATIONS? (open-telemetry/opentelemetry-python-contrib#3967)

* Sound fine by me. Does someone else have a preference?

bschoenmaeckers avatar Nov 27 '25 08:11 bschoenmaeckers