Skip to content

TriggerRunner: Add batch trigger creation duration metric#68521

Open
SameerMesiah97 wants to merge 1 commit into
apache:mainfrom
SameerMesiah97:Triggerer-Batch-Creation-Metric
Open

TriggerRunner: Add batch trigger creation duration metric#68521
SameerMesiah97 wants to merge 1 commit into
apache:mainfrom
SameerMesiah97:Triggerer-Batch-Creation-Metric

Conversation

@SameerMesiah97

Copy link
Copy Markdown
Contributor

Description

This change adds a batch_trigger_creation_duration timing metric to measure the total time spent creating pending triggers during a single invocation of TriggerRunner.create_triggers().

The metric is emitted only when trigger creation work is performed.

Rationale

Trigger creation occurs on the triggerer event loop. During periods of high trigger creation volume, processing large batches of pending triggers may occupy the event loop for extended periods, but this time is not currently observable.

This metric provides visibility into the cost of trigger creation and helps identify situations where large creation batches contribute to triggerer latency.

Tests

Added a unit test verifying that the batch_trigger_creation_duration metric is emitted when pending triggers are successfully created.

Backwards Compatibility

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

Add a timing metric that records the time spent creating all pending
triggers during a single create_triggers() invocation.

Also add a unit test verifying that the metric is emitted when triggers
are successfully created.
@SameerMesiah97 SameerMesiah97 marked this pull request as ready for review June 14, 2026 10:53
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.

1 participant