Browse Source

feat(stats-detectors): Update issue preview description (#58118)

Add transaction name to the Regression field. For Slack previews we only
display the first field so I'm adding more context to that field.

Fixes https://github.com/getsentry/sentry/issues/57706
Dameli Ushbayeva 1 year ago
parent
commit
95ba607928

+ 1 - 1
src/sentry/statistical_detectors/issue_platform_adapter.py

@@ -45,7 +45,7 @@ def send_regressions_to_plaform(regressions: List[BreakpointData], automatic_det
             evidence_display=[
                 IssueEvidence(
                     name="Regression",
-                    value=f"Increased from {displayed_old_baseline}ms to {displayed_new_baseline}ms (P95)",
+                    value=f'{regression["transaction"]} duration increased from {displayed_old_baseline}ms to {displayed_new_baseline}ms (P95)',
                     important=True,
                 ),
                 IssueEvidence(

+ 1 - 1
tests/sentry/statistical_detectors/test_issue_platform_adapter.py

@@ -43,7 +43,7 @@ def test_send_regressions_to_plaform(mock_produce_occurrence_to_kafka):
             "evidence_display": [
                 {
                     "name": "Regression",
-                    "value": "Increased from 14.0ms to 28.0ms (P95)",
+                    "value": "foo duration increased from 14.0ms to 28.0ms (P95)",
                     "important": True,
                 },
                 {"name": "Transaction", "value": "foo", "important": True},