Skip to content

Commit 20aa3e5

Browse files
authored
feat(core): Default span status to ok in transaction mode (#22521)
We do this in node via opentelemetry span processing today, so if we remove this processing a bunch of tests fail for node which rely on span status being OK. I figured this makes sense and likely is more or less the same if this is ok or unset for a span, and also aligns with span streaming 🤔
1 parent f8dc497 commit 20aa3e5

58 files changed

Lines changed: 150 additions & 38 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

dev-packages/browser-integration-tests/suites/public-api/startSpan/standalone-mixed-transaction/test.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ sentryTest(
7676
segment_id: transactionEnvelopeItem.contexts?.trace?.span_id,
7777
parent_span_id: parentSpanId,
7878
origin: 'manual',
79+
status: 'ok',
7980
span_id: expect.stringMatching(/[a-f\d]{16}/),
8081
start_timestamp: expect.any(Number),
8182
timestamp: expect.any(Number),
@@ -91,6 +92,7 @@ sentryTest(
9192
'sentry.source': 'custom',
9293
},
9394
origin: 'manual',
95+
status: 'ok',
9496
span_id: parentSpanId,
9597
trace_id: traceId,
9698
},
@@ -110,6 +112,7 @@ sentryTest(
110112
},
111113
description: 'inner',
112114
origin: 'manual',
115+
status: 'ok',
113116
parent_span_id: parentSpanId,
114117
span_id: expect.stringMatching(/[a-f\d]{16}/),
115118
start_timestamp: expect.any(Number),

dev-packages/browser-integration-tests/suites/public-api/startSpan/standalone/test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ sentryTest('sends a segment span envelope', async ({ getLocalTestUrl, page }) =>
4848
},
4949
description: 'standalone_segment_span',
5050
origin: 'manual',
51+
status: 'ok',
5152
span_id: expect.stringMatching(/^[\da-f]{16}$/),
5253
start_timestamp: expect.any(Number),
5354
timestamp: expect.any(Number),

dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegration/backgroundtab-custom/test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ sentryTest('should finish a custom transaction when the page goes background', a
1919
const status_before = spanJsonBefore.status;
2020

2121
expect(description_before).toBe('test-span');
22-
expect(status_before).toBeUndefined();
22+
expect(status_before).toBe('ok');
2323

2424
await page.locator('#go-background').click();
2525
const spanJsonAfter: SpanJSON = await page.evaluate('window.getSpanJson()');

dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegration/navigation-redirect/multiple-redirects/test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ sentryTest(
6464
description: expect.stringContaining('/sub-page-redirect-'),
6565
op: 'navigation.redirect',
6666
origin: 'auto.navigation.browser',
67+
status: 'ok',
6768
parent_span_id: pageloadRequest.contexts!.trace!.span_id,
6869
span_id: expect.any(String),
6970
start_timestamp: expect.any(Number),

dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegration/navigation-redirect/pageload-redirect/test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ sentryTest('creates a pageload root span with navigation.redirect childspan', as
6060
description: '/sub-page',
6161
op: 'navigation.redirect',
6262
origin: 'auto.navigation.browser',
63+
status: 'ok',
6364
parent_span_id: pageloadRequest.contexts!.trace!.span_id,
6465
span_id: expect.any(String),
6566
start_timestamp: expect.any(Number),

dev-packages/browser-integration-tests/suites/tracing/metrics/pageload-resource-spans/test.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ sentryTest('adds resource spans to pageload transaction', async ({ getLocalTestU
110110
description: 'https://sentry-test-site.example/path/to/image.svg',
111111
op: 'resource.img',
112112
origin: 'auto.resource.browser.metrics',
113+
status: 'ok',
113114
parent_span_id: spanId,
114115
span_id: expect.stringMatching(/^[a-f\d]{16}$/),
115116
start_timestamp: expect.any(Number),
@@ -158,6 +159,7 @@ sentryTest('adds resource spans to pageload transaction', async ({ getLocalTestU
158159
description: 'https://sentry-test-site.example/path/to/style.css',
159160
op: 'resource.link',
160161
origin: 'auto.resource.browser.metrics',
162+
status: 'ok',
161163
parent_span_id: spanId,
162164
span_id: expect.stringMatching(/^[a-f\d]{16}$/),
163165
start_timestamp: expect.any(Number),
@@ -200,6 +202,7 @@ sentryTest('adds resource spans to pageload transaction', async ({ getLocalTestU
200202
description: 'https://sentry-test-site.example/path/to/script.js',
201203
op: 'resource.script',
202204
origin: 'auto.resource.browser.metrics',
205+
status: 'ok',
203206
parent_span_id: spanId,
204207
span_id: expect.stringMatching(/^[a-f\d]{16}$/),
205208
start_timestamp: expect.any(Number),

dev-packages/browser-integration-tests/suites/tracing/metrics/web-vitals-inp-late/test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ sentryTest('should capture an INP click event span after pageload', async ({ bro
7979
exclusive_time: inpValue,
8080
op: 'ui.interaction.click',
8181
origin: 'auto.http.browser.inp',
82+
status: 'ok',
8283
is_segment: true,
8384
segment_id: spanEnvelopeItem.span_id,
8485
span_id: expect.stringMatching(/[a-f\d]{16}/),

dev-packages/browser-integration-tests/suites/tracing/metrics/web-vitals-inp-navigate/test.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ sentryTest(
8282
exclusive_time: inpValue,
8383
op: 'ui.interaction.click',
8484
origin: 'auto.http.browser.inp',
85+
status: 'ok',
8586
is_segment: true,
8687
segment_id: spanEnvelopeItem.span_id,
8788
span_id: expect.stringMatching(/[a-f\d]{16}/),
@@ -163,6 +164,7 @@ sentryTest(
163164
exclusive_time: inpValue,
164165
op: 'ui.interaction.click',
165166
origin: 'auto.http.browser.inp',
167+
status: 'ok',
166168
is_segment: true,
167169
segment_id: spanEnvelopeItem.span_id,
168170
span_id: expect.stringMatching(/[a-f\d]{16}/),

dev-packages/browser-integration-tests/suites/tracing/metrics/web-vitals-inp-parametrized-late/test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ sentryTest(
8282
exclusive_time: inpValue,
8383
op: 'ui.interaction.click',
8484
origin: 'auto.http.browser.inp',
85+
status: 'ok',
8586
is_segment: true,
8687
segment_id: spanEnvelopeItem.span_id,
8788
span_id: expect.stringMatching(/[a-f\d]{16}/),

dev-packages/browser-integration-tests/suites/tracing/metrics/web-vitals-inp-parametrized/test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ sentryTest(
7979
exclusive_time: inpValue,
8080
op: 'ui.interaction.click',
8181
origin: 'auto.http.browser.inp',
82+
status: 'ok',
8283
segment_id: expect.not.stringMatching(spanEnvelopeItem.span_id!),
8384
// parent is the pageload span
8485
parent_span_id: expect.stringMatching(/[a-f\d]{16}/),

0 commit comments

Comments
 (0)