Repository navigation
feat(issues): Add contributing issues to the related issues endpoint - #131008
Merged
Christinarlong merged 3 commits intoNov 13, 2026
Merged
Christinarlong merged 3 commits into
Christinarlong merged 3 commits into
Conversation
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.
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
marked this pull request as ready for review
November 12, 2026 23:29
scttcper
approved these changes
Nov 12, 2026
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a third relation type,
contributing, to theGroupRelatedendpoint.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 Issuessection 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"} ] } }contributingisnot_applicablefor 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'sunavailablewhen the search fails.Stacked on #130992.