Skip to content

feat(events): Declare event identifiers as typed parts - #2390

Closed
sentry-junior[bot] wants to merge 3 commits into
mainfrom
feat/structured-event-identifiers
Closed

sentry-junior[bot] wants to merge 3 commits into
mainfrom
feat/structured-event-identifiers

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Closed without merge. #2362 item 7 replaces this.

Item 7 removes identifier from saved event automation triggers. Org, project, repo and PR become filters on event data. After that, people and the dashboard do not type identifiers for automations. Watches keep exact identifiers, but the agent gets them as exact strings from tool results. So typed identifier parts no longer solve a user problem. They would also break the public @sentry/junior-plugin-api contract for no gain.

What carries forward into item 7:

  • Scope values are typed filters on event data, with Zod, and errors name the wrong filter.
  • Converting saved identifiers to filters is a one-time job per plugin.
  • Known edge cases for that conversion: GitHub environment and release tag are stored percent-encoded and lowercased. Slack current_channel is a placeholder, not a channel id.

The original description of this PR is in the edit history.

Refs #2362

via David Cramer.

--

View Junior Session [Sentry]

sentry-junior Bot and others added 3 commits October 29, 2026 19:45
A trigger could save a filter that never matches. The filter could name
a field that no selected event sets, or a field that a plugin removed.
For example, a GitHub issue.closed trigger with a senderId filter saved
and then never ran.

Match fields now take an optional `events` list: the events that set
the field. `eventTriggerProblems` in plugin-api is the one check for a
trigger's events and filters. Core uses it when it saves an event
automation (tools and dashboard API) or a Watch, and rejects the
trigger with every problem in plain words. The dashboard editor uses
the same check instead of its own copy. It hides filters that a
selected event does not set, and it lists the problems of a saved
trigger that no longer fits the catalog.

GitHub declares the events for its filters: issue comment filters are
set only on issue.comment.created, deployment filters only on
deployment events, and pull request filters only on pull request
events. The pull request comment webhook has no head branch. Linear,
Sentry, and Vercel need no declarations.

Refs #2362

Co-Authored-By: David Cramer <david@sentry.io>
Address design review feedback on the unmatchable-filter check.

- Merge repository match fields with mergeEventMatchFields, which unions
  the events lists and rejects conflicting copies of one field.
- Test GitHub filter declarations against the webhook normalizers and
  the lazy pull request lookups, instead of against themselves.
- Report a saved trigger as unavailable when eventTriggerProblems finds a
  problem, and list the problems in Slack details, tool results, and the
  dashboard. The list SQL uses the same rule.
- Move the unknown resource type check into the shared plugin-api check.
- Say "filter" in agent, Slack, and dashboard text. Agent errors name the
  match.<key> input and the plugin display name.

Refs #2362

Co-Authored-By: David Cramer <david@sentry.io>

Co-Authored-By: David Cramer <david@sentry.io>
Replace the regex identifier pattern on plugin resource types with named,
typed parts and a template, such as {owner}/{repo}#{number}. Square
brackets mark optional text, so GitHub deployment and release sources and
Vercel deployments keep their optional segments.

One plugin-api module builds and parses identifiers. Core uses it to reject
identifiers that do not fit their resource type, with errors that name the
wrong part. The dashboard editor shows one field per part and keeps the
stored string exact. searchEventTypes returns the template and parts.

Stored identifiers and exact-match routing do not change. Each plugin
webhook test checks that every identifier it publishes reads back from its
declared parts.

Refs #2362

Co-Authored-By: David Cramer <david@sentry.io>

Co-Authored-By: David Cramer <david@sentry.io>
@vercel

vercel Bot commented Oct 29, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
junior-docs Ready Ready Preview Oct 29, 2026 7:59pm UTC

Request Review

@sentry-junior
sentry-junior Bot force-pushed the feat/reject-unmatchable-filters branch from f3a9979 to 7d3ed7e Compare October 29, 2026 20:03
Base automatically changed from feat/reject-unmatchable-filters to main October 29, 2026 20:48
@sentry-junior sentry-junior Bot closed this Oct 29, 2026

This branch was successfully deployed

1 active deployment
Preview – junior-docs — 38346aa0 Deployed Oct 29, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants