TriggerRunnerSupervisor: Add trigger queue delay metric#67927
Conversation
24e5d94 to
3e1705c
Compare
|
Requesting review for this. |
|
@SameerMesiah97 — I've removed the 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 |
1874a51 to
6d8159b
Compare
There was a problem hiding this comment.
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?
6d8159b to
2726e99
Compare
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.
2726e99 to
1d70e40
Compare
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.
Description
This change adds a
trigger_queue_delaytiming metric to measure the time between a trigger workload being queued by theTriggerRunnerSupervisorand being processed by theTriggerRunner.A
queued_attimestamp is recorded whenRunTriggerworkloads are enqueued, and the resulting delay is emitted as a timing metric during trigger creation. The metric includes the triggerer'steam_nametag 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_delaymetric 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.