You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently the OTEL metrics exporter hardcodes /v1/metrics as the endpoint path. Some collectors like VictoriaMetrics expect metrics at different paths (e.g. /opentelemetry/api/v1/push or /insert/0/).
Congratulations on your first Pull Request and welcome to the Apache Airflow community! If you have any issues or are unsure about any anything please check our Contributors' Guide
Here are some useful points:
Pay attention to the quality of your code (ruff, mypy and type annotations). Our prek-hooks will help you with that.
In case of a new feature add useful documentation (in docstrings or in docs/ directory). Adding a new operator? Check this short guide Consider adding an example Dag that shows how users should use it.
Consider using Breeze environment for testing locally, it's a heavy docker but it ships with a working Airflow and a lot of integrations.
Be patient and persistent. It might take some time to get a review or get the final approval from Committers.
Please follow ASF Code of Conduct for all communication including (but not limited to) comments on Pull Requests, Mailing list and Slack.
Hi maintainers, before adding tests and a newsfragment I'd like to confirm the design for otel_path: should it be a path-only value (e.g., /v1/metrics) that gets appended to the configured otel_endpoint, or a full endpoint override (e.g., https://collector:4318/v1/metrics)? The current implementation treats it as a path appended to otel_endpoint, but the config description says "path to the OTLP endpoint" which could be interpreted either way. Please confirm the intended semantics so I can add correct tests, docs, and a newsfragment.
This branch has not been deployed
No deployments
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #42492
Currently the OTEL metrics exporter hardcodes
/v1/metricsas the endpoint path. Some collectors like VictoriaMetrics expect metrics at different paths (e.g./opentelemetry/api/v1/pushor/insert/0/).Changes
shared/observability/src/airflow_shared/observability/common.pypath: str | None = Noneparameter toget_otel_data_exporter()pathif provided, falling back to/v1/{endpoint_suffix}shared/observability/src/airflow_shared/observability/metrics/otel_logger.pypath: str | None = Noneparameter toget_otel_logger()paththrough toget_otel_data_exporter()airflow-core/src/airflow/observability/metrics/otel_logger.py[metrics] otel_pathconfig with fallback to/v1/metricsget_otel_logger()task-sdk/src/airflow/sdk/observability/metrics/otel_logger.pyairflow-core/src/airflow/config_templates/config.ymlotel_pathconfig option in the[metrics]section with default/v1/metricsUsage
Set in
airflow.cfg:[metrics]
otel_path = /opentelemetry/api/v1/push
Or via environment variable (standard OTel):
OTEL_EXPORTER_OTLP_METRICS_ENDPOINT=http://collector:4318/opentelemetry/api/v1/push