Skip to content

feat(issues): Add contributing issues to the related issues endpoint - #131008

Merged
Christinarlong merged 3 commits into
unified-similarity-api-same-tracefrom
unified-similarity-api-contributing
Nov 13, 2026
Merged

Christinarlong merged 3 commits into
unified-similarity-api-same-tracefrom
unified-similarity-api-contributing

Conversation

@Christinarlong

@Christinarlong Christinarlong commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor
  • Adds a third relation type, contributing, to the GroupRelated endpoint.

  • For a metric issue whose detector counts errors or releases, it returns the issues that match the detector's query during the open period, from most events to least.

  • This query btw is the same as the Contributing Issues section within Metric Issues, but agents have no way to reach that today. The search covers the metric issue's latest open period, starting one detector interval and a minute before it so we can capture the 'triggering' parts.

Response example for a metric issue:

{
  "data": [
    {
      "issue": {"id": "...", "shortId": "...", "...": "..."},
      "relations": [{"type": "contributing"}]
    }
  ],
  "meta": {
    "types": [
      {"type": "similar_stacktrace", "status": "not_applicable", "detail": "Only error issues have similar stack traces."},
      {"type": "same_trace", "status": "ok", "eventId": "60fc17404bf4445c81675be939ef74d6", "traceId": "a7d67cf796774551a95be6543cacd459"},
      {"type": "contributing", "status": "ok", "eventId": "60fc17404bf4445c81675be939ef74d6", "start": "2026-11-12T21:43:00+00:00"}
    ]
  }
}

contributing is not_applicable for issues that aren't metric issues, for detectors on other datasets (spans, logs, transactions), and for detector queries issue search can't run, such as ones with AND or OR. It's unavailable when the search fails.

Stacked on #130992.

For a metric issue on errors or releases, the contributing type runs the detector's query as
an issue search over the metric issue's latest open period, as the Contributing Issues section of
the issue sidebar does. Issues come back most events first, and the type's meta.types entry
reports the time range searched.

The endpoint description no longer has a sentence per type. Each type's description lives in
its module and fills the type parameter's description.
@Christinarlong Christinarlong self-assigned this Nov 12, 2026
@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label Nov 12, 2026
The test asserted every type's meta for a metric issue, so a change to same_trace or
similar_stacktrace would break it. It now requests only contributing and checks the 503.
@Christinarlong
Christinarlong marked this pull request as ready for review November 12, 2026 23:29
@Christinarlong
Christinarlong requested review from a team as code owners November 12, 2026 23:29
The detector's saved query can name an environment that no longer exists. Looking it up
raised Environment.DoesNotExist and failed the whole request. Return no issues instead, as the
issues list does.
@Christinarlong
Christinarlong merged commit 25dfb70 into master Nov 13, 2026
78 checks passed
@Christinarlong
Christinarlong deleted the unified-similarity-api-contributing branch November 13, 2026 02:12
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