Skip to content

Commit 7216f52

Browse files
authored
feat(preprod): Add detector_id to size analysis occurrence evidence data (#109487)
This allows the issue platform to link occurrences back to the detector that created them, enabling detector-group associations and workflow processing. Agent transcript: https://claudescope.sentry.dev/share/0aobI3aV0NKda6frQ7Lq3Mmn1EJSQSHOwHuASXjzQwo
1 parent a200a20 commit 7216f52

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/sentry/preprod/size_analysis/grouptype.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,9 @@ def create_occurrence(
186186

187187
platform = metadata["platform"] if metadata else "unknown"
188188

189-
evidence_data: dict[str, Any] = {}
189+
evidence_data: dict[str, Any] = {
190+
"detector_id": self.detector.id,
191+
}
190192
if metadata:
191193
evidence_data["head_artifact_id"] = metadata["head_artifact_id"]
192194
evidence_data["base_artifact_id"] = metadata["base_artifact_id"]

tests/sentry/preprod/size_analysis/test_grouptype.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -560,4 +560,4 @@ def test_create_occurrence_without_metadata(self):
560560
assert occurrence.issue_title == "Install size regression"
561561
assert event_data["platform"] == "unknown"
562562
assert event_data["tags"] == {}
563-
assert occurrence.evidence_data == {}
563+
assert occurrence.evidence_data == {"detector_id": detector.id}

0 commit comments

Comments
 (0)