From 4f136c3b9df68fd106ef4539f260ca456e9a1ec9 Mon Sep 17 00:00:00 2001 From: Joris Bayer Date: Tue, 25 Nov 2025 15:56:09 +0100 Subject: [PATCH] write a test, see it fail --- relay-conventions/sentry-conventions | 2 +- tests/integration/test_spans.py | 41 ++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+), 1 deletion(-) diff --git a/relay-conventions/sentry-conventions b/relay-conventions/sentry-conventions index 5ce9da27cb..bd6a5fa378 160000 --- a/relay-conventions/sentry-conventions +++ b/relay-conventions/sentry-conventions @@ -1 +1 @@ -Subproject commit 5ce9da27cb16ae0490bc29daababa5a704f57493 +Subproject commit bd6a5fa378f586c2225ff94c8cd292c503cae764 diff --git a/tests/integration/test_spans.py b/tests/integration/test_spans.py index ce9b31db6e..0c4afab489 100644 --- a/tests/integration/test_spans.py +++ b/tests/integration/test_spans.py @@ -1666,3 +1666,44 @@ def test_scrubs_ip_addresses( assert parent_span["attributes"]["sentry.user.ip"]["value"] == "127.0.0.1" spans_consumer.assert_empty() + + +def test_outcomes_for_trimmed_spans(mini_sentry, relay): + relay = relay( + mini_sentry, + options={ + "limits": {"max_event_size": "20MB"}, + }, + ) + project_id = 42 + mini_sentry.add_full_project_config(project_id) + + event = make_transaction({"event_id": "cbf6960622e14a45abc1f03b2055b186"}) + end = datetime.now(timezone.utc) - timedelta(seconds=1) + duration = timedelta(milliseconds=500) + start = end - duration + event["spans"] = 10 * [ + { + "platform": 1014 * 90 * "a", + "description": "GET /api/0/organizations/?member=1", + "op": "http", + "origin": "manual", + "parent_span_id": "968cff94913ebb07", + "span_id": "bbbbbbbbbbbbbbbb", + "start_timestamp": start.isoformat(), + "status": "success", + "tags": { + "extra_info": "added by user", + }, + "sentry_tags": { + "release": 1024 * 100 * "b", + }, + "timestamp": end.isoformat(), + "trace_id": "ff62a8b040f340bda5d830223def1d81", + }, + ] + + relay.send_event(project_id, event) + + outcomes = mini_sentry.get_outcomes(n=1) + assert outcomes == [1] # TODO: assert the outcomes we expect