diff --git a/dev-packages/node-integration-tests/suites/public-api/startSpan/parallel-root-spans-streamed/scenario.ts b/dev-packages/node-integration-tests/suites/public-api/startSpan/parallel-root-spans-streamed/scenario.ts deleted file mode 100644 index 5e8aedc0458a..000000000000 --- a/dev-packages/node-integration-tests/suites/public-api/startSpan/parallel-root-spans-streamed/scenario.ts +++ /dev/null @@ -1,33 +0,0 @@ -import * as Sentry from '@sentry/node'; -import { loggingTransport } from '@sentry-internal/node-integration-tests'; - -Sentry.init({ - dsn: 'https://public@dsn.ingest.sentry.io/1337', - release: '1.0', - tracesSampleRate: 1.0, - traceLifecycle: 'stream', - transport: loggingTransport, -}); - -Sentry.getCurrentScope().setPropagationContext({ - parentSpanId: '1234567890123456', - traceId: '12345678901234567890123456789012', - sampleRand: Math.random(), -}); - -const spanIdTraceId = Sentry.startSpan( - { - name: 'test_span_1', - }, - span1 => span1.spanContext().traceId, -); - -Sentry.startSpan( - { - name: 'test_span_2', - attributes: { spanIdTraceId }, - }, - () => undefined, -); - -Sentry.flush(); diff --git a/dev-packages/node-integration-tests/suites/public-api/startSpan/parallel-root-spans-streamed/test.ts b/dev-packages/node-integration-tests/suites/public-api/startSpan/parallel-root-spans-streamed/test.ts deleted file mode 100644 index 5f45cccdbf8a..000000000000 --- a/dev-packages/node-integration-tests/suites/public-api/startSpan/parallel-root-spans-streamed/test.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { afterAll, expect, test } from 'vitest'; -import { cleanupChildProcesses, createRunner } from '../../../../utils/runner'; - -afterAll(() => { - cleanupChildProcesses(); -}); - -test('sends manually started streamed parallel root spans in root context', async () => { - expect.assertions(6); - - await createRunner(__dirname, 'scenario.ts') - .expect({ - span: spanContainer => { - expect(spanContainer).toBeDefined(); - - const span1 = spanContainer.items.find(item => item.name === 'test_span_1'); - const span2 = spanContainer.items.find(item => item.name === 'test_span_2'); - expect(span1).toBeDefined(); - expect(span2).toBeDefined(); - - // Both root spans continue the scope's propagation context, matching the core SDK behavior. - expect(span1!.trace_id).toBe('12345678901234567890123456789012'); - expect(span1!.parent_span_id).toBe('1234567890123456'); - - // Same trace ID for both spans - expect(span2!.trace_id).toBe(span1!.trace_id); - }, - }) - .start() - .completed(); -}); diff --git a/dev-packages/node-integration-tests/suites/public-api/startSpan/parallel-root-spans/scenario.ts b/dev-packages/node-integration-tests/suites/public-api/startSpan/parallel-root-spans/scenario.ts index 099a8e73f57e..ab031429489b 100644 --- a/dev-packages/node-integration-tests/suites/public-api/startSpan/parallel-root-spans/scenario.ts +++ b/dev-packages/node-integration-tests/suites/public-api/startSpan/parallel-root-spans/scenario.ts @@ -2,7 +2,6 @@ import * as Sentry from '@sentry/node'; import { loggingTransport } from '@sentry-internal/node-integration-tests'; Sentry.init({ - traceLifecycle: 'static', dsn: 'https://public@dsn.ingest.sentry.io/1337', release: '1.0', tracesSampleRate: 1.0, diff --git a/dev-packages/node-integration-tests/suites/public-api/startSpan/parallel-root-spans/test.ts b/dev-packages/node-integration-tests/suites/public-api/startSpan/parallel-root-spans/test.ts index 674cafad1f70..c30a35bc06ba 100644 --- a/dev-packages/node-integration-tests/suites/public-api/startSpan/parallel-root-spans/test.ts +++ b/dev-packages/node-integration-tests/suites/public-api/startSpan/parallel-root-spans/test.ts @@ -6,23 +6,23 @@ afterAll(() => { }); test('should send manually started parallel root spans in root context', async () => { - expect.assertions(6); - await createRunner(__dirname, 'scenario.ts') - .expect({ transaction: { transaction: 'test_span_1' } }) .expect({ - transaction: transaction => { - expect(transaction).toBeDefined(); - const traceId = transaction.contexts?.trace?.trace_id; + span: container => { + const span1 = container.items.find(span => span.name === 'test_span_1'); + const span2 = container.items.find(span => span.name === 'test_span_2'); + expect(span1?.is_segment).toBe(true); + expect(span2?.is_segment).toBe(true); + expect(span1?.start_timestamp).toEqual(expect.any(Number)); + expect(span1?.end_timestamp).toEqual(expect.any(Number)); - // Both root spans continue the scope's propagation context, matching the core SDK behavior. - expect(traceId).toBe('12345678901234567890123456789012'); - expect(transaction.contexts?.trace?.parent_span_id).toBe('1234567890123456'); + // Both root spans continue the scope's propagation context, including the parentSpanId. + expect(span1?.trace_id).toBe('12345678901234567890123456789012'); + expect(span1?.parent_span_id).toBe('1234567890123456'); + expect(span2?.parent_span_id).toBe('1234567890123456'); - // Same trace ID as the first span - const trace1Id = transaction.contexts?.trace?.data?.spanIdTraceId; - expect(trace1Id).toBe('12345678901234567890123456789012'); - expect(trace1Id).toBe(traceId); + expect(span2?.trace_id).toBe(span1?.trace_id); + expect(span2?.attributes.spanIdTraceId).toEqual({ type: 'string', value: span1?.trace_id }); }, }) .start() diff --git a/dev-packages/node-integration-tests/suites/public-api/startSpan/parallel-spans-in-scope-streamed/scenario.ts b/dev-packages/node-integration-tests/suites/public-api/startSpan/parallel-spans-in-scope-streamed/scenario.ts deleted file mode 100644 index d688d3c3adf7..000000000000 --- a/dev-packages/node-integration-tests/suites/public-api/startSpan/parallel-spans-in-scope-streamed/scenario.ts +++ /dev/null @@ -1,29 +0,0 @@ -import * as Sentry from '@sentry/node'; -import { loggingTransport } from '@sentry-internal/node-integration-tests'; - -Sentry.init({ - dsn: 'https://public@dsn.ingest.sentry.io/1337', - release: '1.0', - tracesSampleRate: 1.0, - traceLifecycle: 'stream', - transport: loggingTransport, -}); - -Sentry.withScope(() => { - const spanIdTraceId = Sentry.startSpan( - { - name: 'test_span_1', - }, - span1 => span1.spanContext().traceId, - ); - - Sentry.startSpan( - { - name: 'test_span_2', - attributes: { spanIdTraceId }, - }, - () => undefined, - ); -}); - -Sentry.flush(); diff --git a/dev-packages/node-integration-tests/suites/public-api/startSpan/parallel-spans-in-scope-streamed/test.ts b/dev-packages/node-integration-tests/suites/public-api/startSpan/parallel-spans-in-scope-streamed/test.ts deleted file mode 100644 index 2d5de99aae9e..000000000000 --- a/dev-packages/node-integration-tests/suites/public-api/startSpan/parallel-spans-in-scope-streamed/test.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { afterAll, expect, test } from 'vitest'; -import { cleanupChildProcesses, createRunner } from '../../../../utils/runner'; - -afterAll(() => { - cleanupChildProcesses(); -}); - -test('sends manually started streamed parallel root spans outside of root context', async () => { - expect.assertions(6); - - await createRunner(__dirname, 'scenario.ts') - .expect({ - span: spanContainer => { - expect(spanContainer).toBeDefined(); - - const span1 = spanContainer.items.find(item => item.name === 'test_span_1'); - const span2 = spanContainer.items.find(item => item.name === 'test_span_2'); - expect(span1).toBeDefined(); - expect(span2).toBeDefined(); - - expect(span1!.trace_id).toMatch(/^[0-9a-f]{32}$/); - expect(span1!.parent_span_id).toBeUndefined(); - - // Same trace ID for both spans - both root spans share the scope's propagation context - expect(span2!.trace_id).toBe(span1!.trace_id); - }, - }) - .start() - .completed(); -}); diff --git a/dev-packages/node-integration-tests/suites/public-api/startSpan/parallel-spans-in-scope-with-parentSpanId-streamed/scenario.ts b/dev-packages/node-integration-tests/suites/public-api/startSpan/parallel-spans-in-scope-with-parentSpanId-streamed/scenario.ts deleted file mode 100644 index 64f194549572..000000000000 --- a/dev-packages/node-integration-tests/suites/public-api/startSpan/parallel-spans-in-scope-with-parentSpanId-streamed/scenario.ts +++ /dev/null @@ -1,35 +0,0 @@ -import * as Sentry from '@sentry/node'; -import { loggingTransport } from '@sentry-internal/node-integration-tests'; - -Sentry.init({ - dsn: 'https://public@dsn.ingest.sentry.io/1337', - release: '1.0', - tracesSampleRate: 1.0, - traceLifecycle: 'stream', - transport: loggingTransport, -}); - -Sentry.withScope(scope => { - scope.setPropagationContext({ - parentSpanId: '1234567890123456', - traceId: '12345678901234567890123456789012', - sampleRand: Math.random(), - }); - - const spanIdTraceId = Sentry.startSpan( - { - name: 'test_span_1', - }, - span1 => span1.spanContext().traceId, - ); - - Sentry.startSpan( - { - name: 'test_span_2', - attributes: { spanIdTraceId }, - }, - () => undefined, - ); -}); - -Sentry.flush(); diff --git a/dev-packages/node-integration-tests/suites/public-api/startSpan/parallel-spans-in-scope-with-parentSpanId-streamed/test.ts b/dev-packages/node-integration-tests/suites/public-api/startSpan/parallel-spans-in-scope-with-parentSpanId-streamed/test.ts deleted file mode 100644 index 50666c267cdf..000000000000 --- a/dev-packages/node-integration-tests/suites/public-api/startSpan/parallel-spans-in-scope-with-parentSpanId-streamed/test.ts +++ /dev/null @@ -1,32 +0,0 @@ -import { afterAll, expect, test } from 'vitest'; -import { cleanupChildProcesses, createRunner } from '../../../../utils/runner'; - -afterAll(() => { - cleanupChildProcesses(); -}); - -test('sends manually started streamed parallel root spans outside of root context with parentSpanId', async () => { - expect.assertions(6); - - await createRunner(__dirname, 'scenario.ts') - .expect({ - span: spanContainer => { - expect(spanContainer).toBeDefined(); - - const span1 = spanContainer.items.find(item => item.name === 'test_span_1'); - const span2 = spanContainer.items.find(item => item.name === 'test_span_2'); - expect(span1).toBeDefined(); - expect(span2).toBeDefined(); - - // Both root spans continue the scope's propagation context, including the parentSpanId, - // matching the core SDK behavior. - expect(span1!.trace_id).toBe('12345678901234567890123456789012'); - expect(span1!.parent_span_id).toBe('1234567890123456'); - - // Same trace ID for both spans - expect(span2!.trace_id).toBe(span1!.trace_id); - }, - }) - .start() - .completed(); -}); diff --git a/dev-packages/node-integration-tests/suites/public-api/startSpan/parallel-spans-in-scope-with-parentSpanId/scenario.ts b/dev-packages/node-integration-tests/suites/public-api/startSpan/parallel-spans-in-scope-with-parentSpanId/scenario.ts index a7c31adbe7bb..bcbf0b91c4ee 100644 --- a/dev-packages/node-integration-tests/suites/public-api/startSpan/parallel-spans-in-scope-with-parentSpanId/scenario.ts +++ b/dev-packages/node-integration-tests/suites/public-api/startSpan/parallel-spans-in-scope-with-parentSpanId/scenario.ts @@ -2,7 +2,6 @@ import * as Sentry from '@sentry/node'; import { loggingTransport } from '@sentry-internal/node-integration-tests'; Sentry.init({ - traceLifecycle: 'static', dsn: 'https://public@dsn.ingest.sentry.io/1337', release: '1.0', tracesSampleRate: 1.0, diff --git a/dev-packages/node-integration-tests/suites/public-api/startSpan/parallel-spans-in-scope-with-parentSpanId/test.ts b/dev-packages/node-integration-tests/suites/public-api/startSpan/parallel-spans-in-scope-with-parentSpanId/test.ts index 509c01a41689..d4881a73f348 100644 --- a/dev-packages/node-integration-tests/suites/public-api/startSpan/parallel-spans-in-scope-with-parentSpanId/test.ts +++ b/dev-packages/node-integration-tests/suites/public-api/startSpan/parallel-spans-in-scope-with-parentSpanId/test.ts @@ -7,20 +7,22 @@ afterAll(() => { test('should send manually started parallel root spans outside of root context with parentSpanId', async () => { await createRunner(__dirname, 'scenario.ts') - .expect({ transaction: { transaction: 'test_span_1' } }) .expect({ - transaction: transaction => { - expect(transaction).toBeDefined(); - const traceId = transaction.contexts?.trace?.trace_id; + span: container => { + const span1 = container.items.find(span => span.name === 'test_span_1'); + const span2 = container.items.find(span => span.name === 'test_span_2'); + expect(span1?.is_segment).toBe(true); + expect(span2?.is_segment).toBe(true); + expect(span1?.start_timestamp).toEqual(expect.any(Number)); + expect(span1?.end_timestamp).toEqual(expect.any(Number)); - // Both root spans continue the scope's propagation context, including the parentSpanId, - // matching the core SDK behavior. - expect(traceId).toBe('12345678901234567890123456789012'); - expect(transaction.contexts?.trace?.parent_span_id).toBe('1234567890123456'); + // Both root spans continue the scope's propagation context, including the parentSpanId. + expect(span1?.trace_id).toBe('12345678901234567890123456789012'); + expect(span1?.parent_span_id).toBe('1234567890123456'); + expect(span2?.parent_span_id).toBe('1234567890123456'); - // Same trace ID as the first span - const trace1Id = transaction.contexts?.trace?.data?.spanIdTraceId; - expect(trace1Id).toBe(traceId); + expect(span2?.trace_id).toBe(span1?.trace_id); + expect(span2?.attributes.spanIdTraceId).toEqual({ type: 'string', value: span1?.trace_id }); }, }) .start() diff --git a/dev-packages/node-integration-tests/suites/public-api/startSpan/parallel-spans-in-scope/scenario.ts b/dev-packages/node-integration-tests/suites/public-api/startSpan/parallel-spans-in-scope/scenario.ts index 39975bdd1c10..80b74d48601c 100644 --- a/dev-packages/node-integration-tests/suites/public-api/startSpan/parallel-spans-in-scope/scenario.ts +++ b/dev-packages/node-integration-tests/suites/public-api/startSpan/parallel-spans-in-scope/scenario.ts @@ -2,7 +2,6 @@ import * as Sentry from '@sentry/node'; import { loggingTransport } from '@sentry-internal/node-integration-tests'; Sentry.init({ - traceLifecycle: 'static', dsn: 'https://public@dsn.ingest.sentry.io/1337', release: '1.0', tracesSampleRate: 1.0, diff --git a/dev-packages/node-integration-tests/suites/public-api/startSpan/parallel-spans-in-scope/test.ts b/dev-packages/node-integration-tests/suites/public-api/startSpan/parallel-spans-in-scope/test.ts index 2d125160dbc4..7217eb1d3228 100644 --- a/dev-packages/node-integration-tests/suites/public-api/startSpan/parallel-spans-in-scope/test.ts +++ b/dev-packages/node-integration-tests/suites/public-api/startSpan/parallel-spans-in-scope/test.ts @@ -6,22 +6,22 @@ afterAll(() => { }); test('should send manually started parallel root spans outside of root context', async () => { - expect.assertions(6); - await createRunner(__dirname, 'scenario.ts') - .expect({ transaction: { transaction: 'test_span_1' } }) .expect({ - transaction: transaction => { - expect(transaction).toBeDefined(); - const traceId = transaction.contexts?.trace?.trace_id; - expect(traceId).toBeDefined(); - expect(transaction.contexts?.trace?.parent_span_id).toBeUndefined(); + span: container => { + const span1 = container.items.find(span => span.name === 'test_span_1'); + const span2 = container.items.find(span => span.name === 'test_span_2'); + expect(span1?.is_segment).toBe(true); + expect(span2?.is_segment).toBe(true); + expect(span1?.start_timestamp).toEqual(expect.any(Number)); + expect(span1?.end_timestamp).toEqual(expect.any(Number)); - const trace1Id = transaction.contexts?.trace?.data?.spanIdTraceId; - expect(trace1Id).toBeDefined(); + expect(span1?.trace_id).toMatch(/^[0-9a-f]{32}$/); + expect(span1?.parent_span_id).toBeUndefined(); + expect(span2?.parent_span_id).toBeUndefined(); - // Same trace ID as the first span - both root spans share the scope's propagation context - expect(trace1Id).toBe(traceId); + expect(span2?.trace_id).toBe(span1?.trace_id); + expect(span2?.attributes.spanIdTraceId).toEqual({ type: 'string', value: span1?.trace_id }); }, }) .start() diff --git a/dev-packages/node-integration-tests/suites/public-api/startSpan/updateName-method-streamed/scenario.ts b/dev-packages/node-integration-tests/suites/public-api/startSpan/updateName-method-streamed/scenario.ts deleted file mode 100644 index 1d3485112fc3..000000000000 --- a/dev-packages/node-integration-tests/suites/public-api/startSpan/updateName-method-streamed/scenario.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { SENTRY_SEGMENT_NAME_SOURCE } from '@sentry/conventions/attributes'; -import * as Sentry from '@sentry/node'; -import { loggingTransport } from '@sentry-internal/node-integration-tests'; - -Sentry.init({ - dsn: 'https://public@dsn.ingest.sentry.io/1337', - release: '1.0', - tracesSampleRate: 1.0, - traceLifecycle: 'stream', - transport: loggingTransport, -}); - -Sentry.startSpan({ name: 'test_span', attributes: { [SENTRY_SEGMENT_NAME_SOURCE]: 'url' } }, (span: Sentry.Span) => { - span.updateName('new name'); -}); - -void Sentry.flush(); diff --git a/dev-packages/node-integration-tests/suites/public-api/startSpan/updateName-method-streamed/test.ts b/dev-packages/node-integration-tests/suites/public-api/startSpan/updateName-method-streamed/test.ts deleted file mode 100644 index fb913fb24559..000000000000 --- a/dev-packages/node-integration-tests/suites/public-api/startSpan/updateName-method-streamed/test.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { SENTRY_SEGMENT_NAME_SOURCE } from '@sentry/conventions/attributes'; -import { afterAll, test } from 'vitest'; -import { cleanupChildProcesses, createRunner } from '../../../../utils/runner'; - -afterAll(() => { - cleanupChildProcesses(); -}); - -test('updates the span name when calling `span.updateName` (streamed)', async () => { - await createRunner(__dirname, 'scenario.ts') - .expect({ - span: { - items: [ - { - name: 'new name', - is_segment: true, - attributes: { - // `updateName` marks the name as explicitly chosen, so the source becomes `custom`, - // overriding the `url` source set at span start (a stale `url` no longer describes the name). - [SENTRY_SEGMENT_NAME_SOURCE]: { type: 'string', value: 'custom' }, - }, - }, - ], - }, - }) - .start() - .completed(); -}); diff --git a/dev-packages/node-integration-tests/suites/public-api/startSpan/updateName-method/scenario.ts b/dev-packages/node-integration-tests/suites/public-api/startSpan/updateName-method/scenario.ts index 803576fd46a7..5c04a121fe45 100644 --- a/dev-packages/node-integration-tests/suites/public-api/startSpan/updateName-method/scenario.ts +++ b/dev-packages/node-integration-tests/suites/public-api/startSpan/updateName-method/scenario.ts @@ -3,7 +3,6 @@ import * as Sentry from '@sentry/node'; import { loggingTransport } from '@sentry-internal/node-integration-tests'; Sentry.init({ - traceLifecycle: 'static', dsn: 'https://public@dsn.ingest.sentry.io/1337', release: '1.0', tracesSampleRate: 1.0, diff --git a/dev-packages/node-integration-tests/suites/public-api/startSpan/updateName-method/test.ts b/dev-packages/node-integration-tests/suites/public-api/startSpan/updateName-method/test.ts index 5db29cd032dc..b7f024ce98a5 100644 --- a/dev-packages/node-integration-tests/suites/public-api/startSpan/updateName-method/test.ts +++ b/dev-packages/node-integration-tests/suites/public-api/startSpan/updateName-method/test.ts @@ -9,18 +9,22 @@ afterAll(() => { test('updates the span name when calling `span.updateName`', async () => { await createRunner(__dirname, 'scenario.ts') .expect({ - transaction: { - transaction: 'new name', - // `updateName` marks the name as explicitly chosen, so the source becomes `custom`, - // overriding the `url` source set at span start (a stale `url` no longer describes the name). - transaction_info: { source: 'custom' }, - contexts: { - trace: { + span: { + items: [ + { + name: 'new name', + is_segment: true, span_id: expect.any(String), trace_id: expect.any(String), - data: { [SENTRY_SEGMENT_NAME_SOURCE]: 'custom' }, + start_timestamp: expect.any(Number), + end_timestamp: expect.any(Number), + attributes: { + // `updateName` marks the name as explicitly chosen, so the source becomes `custom`, + // overriding the `url` source set at span start (a stale `url` no longer describes the name). + [SENTRY_SEGMENT_NAME_SOURCE]: { type: 'string', value: 'custom' }, + }, }, - }, + ], }, }) .start() diff --git a/dev-packages/node-integration-tests/suites/public-api/startSpan/updateSpanName-function-streamed/scenario.ts b/dev-packages/node-integration-tests/suites/public-api/startSpan/updateSpanName-function-streamed/scenario.ts deleted file mode 100644 index cd85685fb5e6..000000000000 --- a/dev-packages/node-integration-tests/suites/public-api/startSpan/updateSpanName-function-streamed/scenario.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { SENTRY_SEGMENT_NAME_SOURCE } from '@sentry/conventions/attributes'; -import * as Sentry from '@sentry/node'; -import { loggingTransport } from '@sentry-internal/node-integration-tests'; - -Sentry.init({ - dsn: 'https://public@dsn.ingest.sentry.io/1337', - release: '1.0', - tracesSampleRate: 1.0, - traceLifecycle: 'stream', - transport: loggingTransport, -}); - -Sentry.startSpan({ name: 'test_span', attributes: { [SENTRY_SEGMENT_NAME_SOURCE]: 'url' } }, (span: Sentry.Span) => { - Sentry.updateSpanName(span, 'new name'); -}); - -void Sentry.flush(); diff --git a/dev-packages/node-integration-tests/suites/public-api/startSpan/updateSpanName-function-streamed/test.ts b/dev-packages/node-integration-tests/suites/public-api/startSpan/updateSpanName-function-streamed/test.ts deleted file mode 100644 index 7479790f0c25..000000000000 --- a/dev-packages/node-integration-tests/suites/public-api/startSpan/updateSpanName-function-streamed/test.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { SENTRY_SEGMENT_NAME_SOURCE } from '@sentry/conventions/attributes'; -import { afterAll, test } from 'vitest'; -import { cleanupChildProcesses, createRunner } from '../../../../utils/runner'; - -afterAll(() => { - cleanupChildProcesses(); -}); - -test('updates the span name and source when calling `updateSpanName` (streamed)', async () => { - await createRunner(__dirname, 'scenario.ts') - .expect({ - span: { - items: [ - { - name: 'new name', - is_segment: true, - attributes: { - [SENTRY_SEGMENT_NAME_SOURCE]: { type: 'string', value: 'custom' }, - }, - }, - ], - }, - }) - .start() - .completed(); -}); diff --git a/dev-packages/node-integration-tests/suites/public-api/startSpan/updateSpanName-function/scenario.ts b/dev-packages/node-integration-tests/suites/public-api/startSpan/updateSpanName-function/scenario.ts index 21aa4865c4aa..30b2953a8625 100644 --- a/dev-packages/node-integration-tests/suites/public-api/startSpan/updateSpanName-function/scenario.ts +++ b/dev-packages/node-integration-tests/suites/public-api/startSpan/updateSpanName-function/scenario.ts @@ -3,7 +3,6 @@ import * as Sentry from '@sentry/node'; import { loggingTransport } from '@sentry-internal/node-integration-tests'; Sentry.init({ - traceLifecycle: 'static', dsn: 'https://public@dsn.ingest.sentry.io/1337', release: '1.0', tracesSampleRate: 1.0, diff --git a/dev-packages/node-integration-tests/suites/public-api/startSpan/updateSpanName-function/test.ts b/dev-packages/node-integration-tests/suites/public-api/startSpan/updateSpanName-function/test.ts index 0c8ae9ef706b..95e380521e8c 100644 --- a/dev-packages/node-integration-tests/suites/public-api/startSpan/updateSpanName-function/test.ts +++ b/dev-packages/node-integration-tests/suites/public-api/startSpan/updateSpanName-function/test.ts @@ -9,16 +9,20 @@ afterAll(() => { test('updates the span name and source when calling `updateSpanName`', async () => { await createRunner(__dirname, 'scenario.ts') .expect({ - transaction: { - transaction: 'new name', - transaction_info: { source: 'custom' }, - contexts: { - trace: { + span: { + items: [ + { + name: 'new name', + is_segment: true, span_id: expect.any(String), trace_id: expect.any(String), - data: { [SENTRY_SEGMENT_NAME_SOURCE]: 'custom' }, + start_timestamp: expect.any(Number), + end_timestamp: expect.any(Number), + attributes: { + [SENTRY_SEGMENT_NAME_SOURCE]: { type: 'string', value: 'custom' }, + }, }, - }, + ], }, }) .start()