Skip to content

Add support for generic OTEL_PYTHON_EXCLUDED_URLS variable #789

@adamantike

Description

@adamantike

Is your feature request related to a problem?
Right now, to exclude URLs from being traced using environment variables, the OTEL_PYTHON_{instrumentation}_EXCLUDED_URLS naming convention must be used.
However, considering that the inner workings of the excluded URLs are independent of the running integration, and actually related to the ExcludedList implementation, having support for a generic OTEL_PYTHON_EXCLUDED_URLS would simplify deployments of different stacks, where DevOps are in charge of creating reusable modules that centralize OpenTelemetry configuration (e.g. OTEL_PROPAGATORS, OTEL_PYTHON_ID_GENERATOR).

Describe the solution you'd like
Having this library read the OTEL_PYTHON_EXCLUDED_URLS environment variable, as a fallback when no value is found at OTEL_PYTHON_{implementation}_EXCLUDED_URLS.

Describe alternatives you've considered
As it is today, having reusable modules for Infrastructure-as-Code requires to either know which application is being deployed (Django, FastAPI, Tornado...), to set the related environment variable, or set all of them even if not required, to simplify the logic and avoid developers needing to be explicit about the framework being used.

For the solution, an alternative approach would be for OTEL_PYTHON_EXCLUDED_URLS to extend what's provided by OTEL_PYTHON_{implementation}_EXCLUDED_URLS. However, that could be a separate discussion.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions