Skip to content

TriggerRunnerSupervisor: Add trigger queue delay metric#67927

Merged
shahar1 merged 2 commits into
apache:mainfrom
SameerMesiah97:Triggerer-Queue-Delay-Metric
Jul 15, 2026
Merged

TriggerRunnerSupervisor: Add trigger queue delay metric#67927
shahar1 merged 2 commits into
apache:mainfrom
SameerMesiah97:Triggerer-Queue-Delay-Metric

Conversation

@SameerMesiah97

@SameerMesiah97 SameerMesiah97 commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

Description

This change adds a trigger_queue_delay timing metric to measure the time between a trigger workload being queued by the TriggerRunnerSupervisor and being processed by the TriggerRunner.

A queued_at timestamp is recorded when RunTrigger workloads are enqueued, and the resulting delay is emitted as a timing metric during trigger creation. The metric includes the triggerer's team_name tag when available.

Rationale

The triggerer currently provides limited visibility into trigger startup latency. During periods of high trigger creation volume, workloads may spend time waiting before they are processed, but this delay is not currently observable.

This metric helps identify triggerer backlog and provides insight into trigger startup performance under load.

Tests

Added unit tests verifying that the trigger_queue_delay metric is emitted with the expected value and tags when a queued workload is processed.

Backwards Compatibility

This change is additive only and does not modify trigger execution behavior, lifecycle semantics, or public APIs.

@boring-cyborg boring-cyborg Bot added area:Executors-core LocalExecutor & SequentialExecutor area:Triggerer labels Jun 3, 2026
@SameerMesiah97
SameerMesiah97 force-pushed the Triggerer-Queue-Delay-Metric branch from 24e5d94 to 3e1705c Compare June 5, 2026 20:29
@SameerMesiah97
SameerMesiah97 marked this pull request as ready for review June 5, 2026 22:02
@potiuk potiuk added the ready for maintainer review Set after triaging when all criteria pass. label Jun 8, 2026
@SameerMesiah97

Copy link
Copy Markdown
Contributor Author

Requesting review for this.

@potiuk

potiuk commented Jun 25, 2026

Copy link
Copy Markdown
Member

@SameerMesiah97 — I've removed the ready for maintainer review label because the next step here is yours: this branch now has merge conflicts with main. It'll go back into the maintainer queue automatically once you rebase onto the latest main and push — no need to re-add the label by hand. There's no rush.

Automated triage note drafted by an AI-assisted tool — may get things wrong; a real Apache Airflow maintainer takes the next look once it's green. (why automated)


Drafted-by: Claude Code (Opus 4.8); reviewed by @potiuk before posting

@potiuk potiuk removed the ready for maintainer review Set after triaging when all criteria pass. label Jun 25, 2026
@SameerMesiah97
SameerMesiah97 force-pushed the Triggerer-Queue-Delay-Metric branch 3 times, most recently from 1874a51 to 6d8159b Compare June 30, 2026 13:53
@potiuk potiuk added the ready for maintainer review Set after triaging when all criteria pass. label Jul 2, 2026

@shahar1 shahar1 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We probably need a newsfragment for this PR.
I think that overall LGTM, but I'll be happy for additional feedback before approval and merging.
@ferruzzi / @o-nikolas - could you please take a second look?

Comment thread airflow-core/src/airflow/jobs/triggerer_job_runner.py Outdated
@SameerMesiah97
SameerMesiah97 force-pushed the Triggerer-Queue-Delay-Metric branch from 6d8159b to 2726e99 Compare July 12, 2026 14:02
Comment thread airflow-core/src/airflow/jobs/triggerer_job_runner.py
Sameer Mesiah added 2 commits July 15, 2026 19:37
Add a trigger_queue_delay timing metric to measure the time
between a trigger workload being queued by the
TriggerRunnerSupervisor and being scheduled by the
TriggerRunner.

Also propagate team_name to TriggerRunner so the metric is
emitted with the expected tags, and add unit tests.
@shahar1
shahar1 merged commit 5930c02 into apache:main Jul 15, 2026
79 checks passed
joshuabvarghese pushed a commit to joshuabvarghese/airflow that referenced this pull request Jul 16, 2026
Add a trigger_queue_delay timing metric to measure the time between a trigger workload being queued by the TriggerRunnerSupervisor and being scheduled by the TriggerRunner. Also propagate team_name to TriggerRunner so the metric is emitted with the expected tags, and add unit tests.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:Executors-core LocalExecutor & SequentialExecutor area:Triggerer ready for maintainer review Set after triaging when all criteria pass.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants