Skip to content

Route metric alert notifications via code ownership inference #116077

@sentry-junior

Description

@sentry-junior

When a metric alert fires and creates a metric issue, there is no mechanism to dynamically route notifications to the team that owns the relevant code. Users must manually configure one alert action per team, which does not scale.

Current behavior

  • Metric alerts operate on aggregate signals (e.g. error rate, duration) and do not inherently know which code paths or issues caused the spike.
  • The "notify suggested assignee" action tags owners inside the Sentry UI but does not send notifications to external channels (e.g. Slack).
  • To notify multiple teams via Slack, users must create a separate alert action per team channel and maintain that mapping manually.

Gap

When a metric issue is created, Sentry already attempts to build a list of contributing issues. Those contributing issues often have code ownership already resolved via ownership rules. That ownership signal is not surfaced to alert routing, so dynamic team notification is not possible today.

Options

  • Use contributing issues for ownership inference — when a metric issue is triggered, resolve owners from the contributing issues list and route alert notifications to the corresponding teams automatically.
  • AI-assisted routing — use an LLM with repository access and the metric/alert name to infer likely code ownership and determine which team(s) to notify. Empirically this approach performs well for "find the right human" tasks and could be offered as an opt-in "let AI decide" routing mode.

Action taken on behalf of Colin Kawai.

Metadata

Metadata

Assignees

No one assigned
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions