What problem do you want to solve?
When building Docker images, we use opentelemetry-bootstrap --action=requirements to generate the list of instrumentor packages to install. However, this command outputs all instrumentors matching installed libraries, even those we explicitly disable at runtime via OTEL_PYTHON_DISABLED_INSTRUMENTATIONS.
This means we install packages we will never use, increasing image size and build time unnecessarily.
Example Dockerfile pattern:
ENV OTEL_PYTHON_DISABLED_INSTRUMENTATIONS="psycopg,system_metrics"
# This still outputs opentelemetry-instrumentation-psycopg and opentelemetry-instrumentation-system-metrics
RUN opentelemetry-bootstrap --action=requirements | pip install -r /dev/stdin
Describe the solution you'd like
opentelemetry-bootstrap should support filtering out disabled instrumentations:
Read OTEL_PYTHON_DISABLED_INSTRUMENTATIONS env var — if set, exclude matching instrumentors from the output. This aligns with the existing runtime behavior.
What problem do you want to solve?
When building Docker images, we use
opentelemetry-bootstrap --action=requirementsto generate the list of instrumentor packages to install. However, this command outputs all instrumentors matching installed libraries, even those we explicitly disable at runtime viaOTEL_PYTHON_DISABLED_INSTRUMENTATIONS.This means we install packages we will never use, increasing image size and build time unnecessarily.
Example Dockerfile pattern:
Describe the solution you'd like
opentelemetry-bootstrapshould support filtering out disabled instrumentations:Read
OTEL_PYTHON_DISABLED_INSTRUMENTATIONSenv var — if set, exclude matching instrumentors from the output. This aligns with the existing runtime behavior.