Skip to content

feat: adds support for OpenTelemetry standard environment variables f…#56634

Merged
potiuk merged 3 commits intoapache:mainfrom
codecae:feature/otel-sdk-environment-support
Oct 16, 2025
Merged

feat: adds support for OpenTelemetry standard environment variables f…#56634
potiuk merged 3 commits intoapache:mainfrom
codecae:feature/otel-sdk-environment-support

Conversation

@codecae
Copy link
Contributor

@codecae codecae commented Oct 14, 2025

The current OpenTelemetry implementation has a fairly rigid configuration specification for endpoint host/port and export interval. While this is probably okay for most configurations, there are cases in which endpoints do not conform with the standard implied by Airflow's implementation. See https://prometheus.io/docs/guides/opentelemetry/#send-opentelemetry-metrics-to-the-prometheus-server for an example of how the API URL can stray from the basic "/v1/metrics" route, yet still be entirely valid.

Instead of adding new configuration values to the metrics and traces sections, this PR adds transparent support for all standard OpenTelemetry environment variables (so far) that would otherwise be overridden by Airflow's configuration.

This change includes the support for:

  • OTEL_EXPORTER_OTLP_ENDPOINT
  • OTEL_EXPORTER_OTLP_METRICS_ENDPOINT
  • OTEL_EXPORTER_OTLP_TRACES_ENDPOINT
  • OTEL_METRIC_EXPORT_INTERVAL

@codecae codecae force-pushed the feature/otel-sdk-environment-support branch from 2063012 to ae0a2b7 Compare October 14, 2025 18:28
@codecae codecae force-pushed the feature/otel-sdk-environment-support branch from ae0a2b7 to b1b8dd0 Compare October 14, 2025 18:40
@potiuk potiuk merged commit 98eb4fb into apache:main Oct 16, 2025
61 checks passed
abdulrahman305 bot pushed a commit to abdulrahman305/airflow that referenced this pull request Oct 17, 2025
apache#56634)

* feat: adds support for OpenTelemetry standard environment variables for configuration.

* Update airflow-core/docs/administration-and-deployment/logging-monitoring/metrics.rst

* Update airflow-core/docs/administration-and-deployment/logging-monitoring/traces.rst

---------

Co-authored-by: Jarek Potiuk <jarek@potiuk.com>
abdulrahman305 bot pushed a commit to abdulrahman305/airflow that referenced this pull request Oct 19, 2025
apache#56634)

* feat: adds support for OpenTelemetry standard environment variables for configuration.

* Update airflow-core/docs/administration-and-deployment/logging-monitoring/metrics.rst

* Update airflow-core/docs/administration-and-deployment/logging-monitoring/traces.rst

---------

Co-authored-by: Jarek Potiuk <jarek@potiuk.com>
TyrellHaywood pushed a commit to TyrellHaywood/airflow that referenced this pull request Oct 22, 2025
apache#56634)

* feat: adds support for OpenTelemetry standard environment variables for configuration.

* Update airflow-core/docs/administration-and-deployment/logging-monitoring/metrics.rst

* Update airflow-core/docs/administration-and-deployment/logging-monitoring/traces.rst

---------

Co-authored-by: Jarek Potiuk <jarek@potiuk.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants