Skip to content

Conversation

@sl0thentr0py
Copy link
Member

@sl0thentr0pysl0thentr0py commented Nov 25, 2025

Description

For some reason since Performance was implemented ages ago, we were not sending the span.status field at all.
Add it back since we are moving to a Span-First world and Agent Monitoring also expects span statuses to be correct for some product features.

Some other notes regarding the status mess:

  • the transaction status is added to the trace_context - this is fine
  • the span status is also added as a tag, this should be removed in a major since it's redundant
  • set_http_status further adds another tag called http.status_code, remove this in the major too

Issues

@linear
Copy link

linearbot commented Nov 25, 2025

@codecov
Copy link

codecovbot commented Nov 25, 2025

❌ 1 Tests Failed:

Tests completedFailedPassedSkipped
286381286372319
View the top 1 failed test(s) by shortest run time
tests.tracing.test_decorator::test_trace_decorator_no_trx
Stack Traces | 0.05s run time
tests/tracing/test_decorator.py:47: in test_trace_decorator_no_trx fake_debug.assert_called_once_with( .../hostedtoolcache/Python/3.14.0.../x64/lib/python3.14/unittest/mock.py:996: in assert_called_once_with raise AssertionError(msg) E AssertionError: Expected 'mock' to be called once. Called 7 times. E Calls: [call('Cannot create a child span for %s. Please start a Sentry transaction before calling this function.', 'time.sleep'), E call('[Monitor] health check negative, downsampling with a factor of %d', 10), E call('Cannot create a child span for %s. Please start a Sentry transaction before calling this function.', 'time.sleep'), E call('Cannot create a child span for %s. Please start a Sentry transaction before calling this function.', 'time.sleep'), E call('[Monitor] health check negative, downsampling with a factor of %d', 10), E call('Cannot create a child span for %s. Please start a Sentry transaction before calling this function.', 'time.sleep'), E call('Cannot create a child span for %s. Please start a Sentry transaction before calling this function.', 'test_decorator.my_example_function')].

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

@sl0thentr0py
Copy link
MemberAuthor

image

@sl0thentr0pysl0thentr0pyforce-pushed the neel/send-span-status branch 2 times, most recently from ffc345d to 811df06CompareNovember 26, 2025 11:21
For some reason since Performance was implemented ages ago, we were not sending the `span.status` field at all. Add it back since we are moving to a Span-First worls and Agent Monitoring also expects span statuses to be correct for some product features. Some other notes regarding the status mess: * the transaction status is added to the `trace_context` - this is fine * the span status is also added as a tag, this should be removed in a major since it's redundant * `set_http_status` further adds another tag called `http.status_code`, remove this in the major too
@sl0thentr0pysl0thentr0py marked this pull request as ready for review November 26, 2025 11:44
@sl0thentr0pysl0thentr0py requested a review from a team as a code ownerNovember 26, 2025 11:44
@sl0thentr0pysl0thentr0py changed the title WIP add back span statusAdd back span statusNov 26, 2025
@sl0thentr0py
Copy link
MemberAuthor

major cleanup tracked in #5154

@sl0thentr0pysl0thentr0py merged commit c720feb into masterNov 26, 2025
162 of 164 checks passed
@sl0thentr0pysl0thentr0py deleted the neel/send-span-status branch November 26, 2025 12:01
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add back span.status

3 participants

@sl0thentr0py@alexander-alderman-webb