The GitHub Actions job "Tests (AMD)" on 
airflow.git/sortega/airflow-tagged-metrics has failed.
Run started by GitHub user sortega (triggered by sortega).

Head commit for run:
be5246415c518f94c5d02fd8245156074cf50ac1 / Sebastián Ortega 
<[email protected]>
Emit Dag tags as metric tags

Add a [metrics] dag_tags_in_metrics option (default False). When enabled, each
Dag tag becomes a metric tag on Dag-run and task-instance metrics: tags with a
colon (e.g. env:prod) split into a key/value pair; plain tags (e.g. production)
become standalone DogStatsd tags, or tag=true in InfluxDB line protocol. 
Built-in
keys (dag_id, run_type, task_id, team_name) win on collision.

Tags come from the DagRun's dag_model.tags. The scheduler hot loop
(get_running_dag_runs_to_examine) and the executor-event failure path eager-load
them (gated on the flag) to avoid per-DagRun queries; other in-session emission
paths fall back to a lazy load, so the tags reach all Dag-run and task-instance
metrics. DagRun.dag_tags_for_stats swallows SQLAlchemyError so a 
detached/expired
instance degrades to no tags rather than breaking the caller.

TaskInstance.stats_tags reuses DagRun.dag_tags_for_stats and adds task_id and
run_type; the Task SDK worker reads the in-memory Dag and also adds run_type, so
ti.* metrics carry a consistent tag set across the worker and scheduler 
emitters.

The build_dag_metric_tags helper lives in the shared observability stats module.

Report URL: https://github.com/apache/airflow/actions/runs/28582091461

With regards,
GitHub Actions via GitBox


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to