Skip to content

feat(seer): Return triggering monitor on workflow runs - #130512

Merged
aliu39 merged 6 commits into
masterfrom
aliu/trigger-api-field
Nov 9, 2026
Merged

aliu39 merged 6 commits into
masterfrom
aliu/trigger-api-field

Conversation

@aliu39

@aliu39 aliu39 commented Nov 9, 2026 •

Copy link
Copy Markdown
Member

The Seer workflow runs list now says which metric breach started each run, so the automations UI can link a run back to its monitor, issue, and event.

Each run gets a trigger field. For runs started by a metric monitor, it has type: "breached_metric" and the detector, event, occurrence, issue, project, environment, and breach time. Other runs return null. The type field leaves room for other kinds of triggers later.

No new storage is needed. Runs started by metric monitors already save these details with the run's inputs. Older runs without them return null.

A deleted monitor's ID stays on its runs, so the frontend needs to handle links to monitors that no longer exist. The frontend type change will follow in a separate PR.

Add a trigger field to the Seer workflow runs endpoint that identifies the
monitor that started each run, read from the run's saved inputs. Runs not
started by a monitor return null.

Co-Authored-By: Claude <noreply@anthropic.com>
@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label Nov 9, 2026
aliu39 and others added 4 commits November 9, 2026 13:25
Parse run extras and breached-metric inputs with their models instead of
reading nested dict keys. Runs without a snapshot return null quietly;
invalid data is logged.

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Rename the trigger type to breached_metric and return the detector, event,
occurrence, issue, project, environment, and observation time from the
saved breach inputs.

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
@aliu39
aliu39 marked this pull request as ready for review November 9, 2026 21:47
@aliu39
aliu39 requested review from a team as code owners November 9, 2026 21:47

@cursor cursor Bot 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.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Want reviews to match your repository better? Bugbot Learning can learn team-specific rules from PR activity. A team admin can enable Learning in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 59a1a63. Configure here.

Co-Authored-By: Claude <noreply@anthropic.com>
@aliu39
aliu39 merged commit 4828892 into master Nov 9, 2026
78 checks passed
@aliu39
aliu39 deleted the aliu/trigger-api-field branch November 9, 2026 22:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants