From 97797990e00d3c0ed6b1e6843fffadd5f085ae3b Mon Sep 17 00:00:00 2001 From: Lukas Stracke Date: Fri, 10 Oct 2025 16:03:16 +0200 Subject: [PATCH 1/5] ref(core): Set span status `internal_error` instead of `unknown_error` --- packages/core/src/tracing/spanstatus.ts | 2 +- packages/core/src/utils/anthropic-ai/index.ts | 2 +- packages/core/src/utils/anthropic-ai/streaming.ts | 2 +- packages/core/src/utils/spanUtils.ts | 2 +- packages/node/src/integrations/tracing/postgresjs.ts | 2 +- packages/opentelemetry/src/utils/mapStatus.ts | 6 +++--- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/core/src/tracing/spanstatus.ts b/packages/core/src/tracing/spanstatus.ts index 6d353ae6a326..6ec08d662409 100644 --- a/packages/core/src/tracing/spanstatus.ts +++ b/packages/core/src/tracing/spanstatus.ts @@ -9,7 +9,7 @@ export const SPAN_STATUS_ERROR = 2; * Converts a HTTP status code into a sentry status with a message. * * @param httpStatus The HTTP response status code. - * @returns The span status or unknown_error. + * @returns The span status or internal_error. */ // https://develop.sentry.dev/sdk/event-payloads/span/ export function getSpanStatusFromHttpCode(httpStatus: number): SpanStatus { diff --git a/packages/core/src/utils/anthropic-ai/index.ts b/packages/core/src/utils/anthropic-ai/index.ts index 8e77dd76b34e..0a977559ca0e 100644 --- a/packages/core/src/utils/anthropic-ai/index.ts +++ b/packages/core/src/utils/anthropic-ai/index.ts @@ -93,7 +93,7 @@ function addPrivateRequestAttributes(span: Span, params: Record */ function handleResponseError(span: Span, response: AnthropicAiResponse): void { if (response.error) { - span.setStatus({ code: SPAN_STATUS_ERROR, message: response.error.type || 'unknown_error' }); + span.setStatus({ code: SPAN_STATUS_ERROR, message: response.error.type || 'internal_error' }); captureException(response.error, { mechanism: { diff --git a/packages/core/src/utils/anthropic-ai/streaming.ts b/packages/core/src/utils/anthropic-ai/streaming.ts index b542cbfda75a..86f5c25baa8a 100644 --- a/packages/core/src/utils/anthropic-ai/streaming.ts +++ b/packages/core/src/utils/anthropic-ai/streaming.ts @@ -59,7 +59,7 @@ function isErrorEvent(event: AnthropicAiStreamingEvent, span: Span): boolean { // If the event is an error, set the span status and capture the error // These error events are not rejected by the API by default, but are sent as metadata of the response if (event.type === 'error') { - span.setStatus({ code: SPAN_STATUS_ERROR, message: event.error?.type ?? 'unknown_error' }); + span.setStatus({ code: SPAN_STATUS_ERROR, message: event.error?.type ?? 'internal_error' }); captureException(event.error, { mechanism: { handled: false, diff --git a/packages/core/src/utils/spanUtils.ts b/packages/core/src/utils/spanUtils.ts index 6e7c62c7631a..d7c261ecd73c 100644 --- a/packages/core/src/utils/spanUtils.ts +++ b/packages/core/src/utils/spanUtils.ts @@ -234,7 +234,7 @@ export function getStatusMessage(status: SpanStatus | undefined): string | undef return 'ok'; } - return status.message || 'unknown_error'; + return status.message || 'internal_error'; } const CHILD_SPANS_FIELD = '_sentryChildSpans'; diff --git a/packages/node/src/integrations/tracing/postgresjs.ts b/packages/node/src/integrations/tracing/postgresjs.ts index 1a0eae973bc6..438a63c804c6 100644 --- a/packages/node/src/integrations/tracing/postgresjs.ts +++ b/packages/node/src/integrations/tracing/postgresjs.ts @@ -128,7 +128,7 @@ export class PostgresJsInstrumentation extends InstrumentationBase Date: Fri, 10 Oct 2025 17:42:40 +0200 Subject: [PATCH 2/5] leave otel status mapping as-is, default to internal_error in http status --- packages/core/src/tracing/spanstatus.ts | 2 +- packages/core/test/lib/tracing/spanstatus.test.ts | 4 ++-- packages/opentelemetry/src/utils/mapStatus.ts | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/core/src/tracing/spanstatus.ts b/packages/core/src/tracing/spanstatus.ts index 6ec08d662409..176e201178de 100644 --- a/packages/core/src/tracing/spanstatus.ts +++ b/packages/core/src/tracing/spanstatus.ts @@ -51,7 +51,7 @@ export function getSpanStatusFromHttpCode(httpStatus: number): SpanStatus { } } - return { code: SPAN_STATUS_ERROR, message: 'unknown_error' }; + return { code: SPAN_STATUS_ERROR, message: 'internal_error' }; } /** diff --git a/packages/core/test/lib/tracing/spanstatus.test.ts b/packages/core/test/lib/tracing/spanstatus.test.ts index ee6bfd59443f..109c97d567a9 100644 --- a/packages/core/test/lib/tracing/spanstatus.test.ts +++ b/packages/core/test/lib/tracing/spanstatus.test.ts @@ -27,14 +27,14 @@ describe('setHttpStatus', () => { expect(data).toMatchObject({ 'http.response.status_code': code }); }); - it("doesn't set the status for an unknown http status code", () => { + it('defaults to internal_error', () => { const span = new SentrySpan({ name: 'test' }); setHttpStatus(span, 600); const { status: spanStatus, data } = spanToJSON(span); - expect(spanStatus).toBeUndefined(); + expect(spanStatus).toBe('internal_error'); expect(data).toMatchObject({ 'http.response.status_code': 600 }); }); }); diff --git a/packages/opentelemetry/src/utils/mapStatus.ts b/packages/opentelemetry/src/utils/mapStatus.ts index c2a4fc14b7d3..742bffdb1551 100644 --- a/packages/opentelemetry/src/utils/mapStatus.ts +++ b/packages/opentelemetry/src/utils/mapStatus.ts @@ -56,7 +56,7 @@ export function mapStatus(span: AbstractSpan): SpanStatus { if (status.message && isStatusErrorMessageValid(status.message)) { return { code: SPAN_STATUS_ERROR, message: status.message }; } else { - return { code: SPAN_STATUS_ERROR, message: 'internal_error' }; + return { code: SPAN_STATUS_ERROR, message: 'unknown_error' }; } } } @@ -72,7 +72,7 @@ export function mapStatus(span: AbstractSpan): SpanStatus { if (status?.code === SpanStatusCode.UNSET) { return { code: SPAN_STATUS_OK }; } else { - return { code: SPAN_STATUS_ERROR, message: 'internal_error' }; + return { code: SPAN_STATUS_ERROR, message: 'unknown_error' }; } } @@ -96,7 +96,7 @@ function inferStatusFromAttributes(attributes: SpanAttributes): SpanStatus | und } if (typeof grpcCodeAttribute === 'string') { - return { code: SPAN_STATUS_ERROR, message: canonicalGrpcErrorCodesMap[grpcCodeAttribute] || 'internal_error' }; + return { code: SPAN_STATUS_ERROR, message: canonicalGrpcErrorCodesMap[grpcCodeAttribute] || 'unknown_error' }; } return undefined; From e8bab8ad470f74697b9ee98e1fd021dc9c004d0a Mon Sep 17 00:00:00 2001 From: Lukas Stracke Date: Thu, 16 Oct 2025 11:15:30 +0200 Subject: [PATCH 3/5] rebase and fix some tests --- .../suites/integrations/supabase/auth/test.ts | 2 +- packages/opentelemetry/src/utils/mapStatus.ts | 2 +- packages/opentelemetry/test/utils/mapStatus.test.ts | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dev-packages/browser-integration-tests/suites/integrations/supabase/auth/test.ts b/dev-packages/browser-integration-tests/suites/integrations/supabase/auth/test.ts index c145e64bd1da..b37fa79ed97e 100644 --- a/dev-packages/browser-integration-tests/suites/integrations/supabase/auth/test.ts +++ b/dev-packages/browser-integration-tests/suites/integrations/supabase/auth/test.ts @@ -143,7 +143,7 @@ sentryTest('should capture Supabase authentication errors', async ({ getLocalTes start_timestamp: expect.any(Number), timestamp: expect.any(Number), trace_id: transactionEvent.contexts?.trace?.trace_id, - status: 'unknown_error', + status: 'internal_error', data: expect.objectContaining({ 'sentry.op': 'db', 'sentry.origin': 'auto.db.supabase', diff --git a/packages/opentelemetry/src/utils/mapStatus.ts b/packages/opentelemetry/src/utils/mapStatus.ts index 742bffdb1551..b12abbb4a17f 100644 --- a/packages/opentelemetry/src/utils/mapStatus.ts +++ b/packages/opentelemetry/src/utils/mapStatus.ts @@ -56,7 +56,7 @@ export function mapStatus(span: AbstractSpan): SpanStatus { if (status.message && isStatusErrorMessageValid(status.message)) { return { code: SPAN_STATUS_ERROR, message: status.message }; } else { - return { code: SPAN_STATUS_ERROR, message: 'unknown_error' }; + return { code: SPAN_STATUS_ERROR, message: 'internal_error' }; } } } diff --git a/packages/opentelemetry/test/utils/mapStatus.test.ts b/packages/opentelemetry/test/utils/mapStatus.test.ts index 1831ec01fc95..b754e121e276 100644 --- a/packages/opentelemetry/test/utils/mapStatus.test.ts +++ b/packages/opentelemetry/test/utils/mapStatus.test.ts @@ -40,7 +40,7 @@ describe('mapStatus', () => { [501, undefined, { code: SPAN_STATUS_ERROR, message: 'unimplemented' }], [503, undefined, { code: SPAN_STATUS_ERROR, message: 'unavailable' }], [504, undefined, { code: SPAN_STATUS_ERROR, message: 'deadline_exceeded' }], - [999, undefined, { code: SPAN_STATUS_ERROR, message: 'unknown_error' }], + [999, undefined, { code: SPAN_STATUS_ERROR, message: 'internal_error' }], // grpc codes [undefined, '1', { code: SPAN_STATUS_ERROR, message: 'cancelled' }], @@ -112,7 +112,7 @@ describe('mapStatus', () => { it('returns error status when span already has error status without message', () => { const span = createSpan('test-span'); span.setStatus({ code: 2 }); // ERROR - expect(mapStatus(span)).toEqual({ code: SPAN_STATUS_ERROR, message: 'unknown_error' }); + expect(mapStatus(span)).toEqual({ code: SPAN_STATUS_ERROR, message: 'internal_error' }); }); it('infers error status form attributes when span already has error status without message', () => { From 943783c9023103538c3748323bc4885235c06938 Mon Sep 17 00:00:00 2001 From: Lukas Stracke Date: Thu, 16 Oct 2025 14:05:23 +0200 Subject: [PATCH 4/5] fix some tests --- .../suites/tracing/anthropic/test.ts | 8 ++++---- .../suites/tracing/google-genai/test.ts | 8 ++++---- .../node-integration-tests/suites/tracing/openai/test.ts | 4 ++-- .../suites/tracing/postgresjs/test.ts | 2 +- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/dev-packages/node-integration-tests/suites/tracing/anthropic/test.ts b/dev-packages/node-integration-tests/suites/tracing/anthropic/test.ts index c05db16fc251..cfd89095ee9c 100644 --- a/dev-packages/node-integration-tests/suites/tracing/anthropic/test.ts +++ b/dev-packages/node-integration-tests/suites/tracing/anthropic/test.ts @@ -42,7 +42,7 @@ describe('Anthropic integration', () => { description: 'messages error-model', op: 'gen_ai.messages', origin: 'auto.ai.anthropic', - status: 'unknown_error', + status: 'internal_error', }), // Third span - token counting (no response.text because recordOutputs=false by default) expect.objectContaining({ @@ -117,7 +117,7 @@ describe('Anthropic integration', () => { description: 'messages error-model', op: 'gen_ai.messages', origin: 'auto.ai.anthropic', - status: 'unknown_error', + status: 'internal_error', }), // Third span - token counting with PII (response.text is present because sendDefaultPii=true enables recordOutputs) expect.objectContaining({ @@ -465,7 +465,7 @@ describe('Anthropic integration', () => { expect.objectContaining({ description: 'messages invalid-format', op: 'gen_ai.messages', - status: 'unknown_error', + status: 'internal_error', data: expect.objectContaining({ 'gen_ai.request.model': 'invalid-format', }), @@ -474,7 +474,7 @@ describe('Anthropic integration', () => { expect.objectContaining({ description: 'models nonexistent-model', op: 'gen_ai.models', - status: 'unknown_error', + status: 'internal_error', data: expect.objectContaining({ 'gen_ai.request.model': 'nonexistent-model', }), diff --git a/dev-packages/node-integration-tests/suites/tracing/google-genai/test.ts b/dev-packages/node-integration-tests/suites/tracing/google-genai/test.ts index 92d669c7e10f..ef960a342d05 100644 --- a/dev-packages/node-integration-tests/suites/tracing/google-genai/test.ts +++ b/dev-packages/node-integration-tests/suites/tracing/google-genai/test.ts @@ -75,7 +75,7 @@ describe('Google GenAI integration', () => { description: 'models error-model', op: 'gen_ai.models', origin: 'auto.ai.google_genai', - status: 'unknown_error', + status: 'internal_error', }), ]), }; @@ -155,7 +155,7 @@ describe('Google GenAI integration', () => { description: 'models error-model', op: 'gen_ai.models', origin: 'auto.ai.google_genai', - status: 'unknown_error', + status: 'internal_error', }), ]), }; @@ -351,7 +351,7 @@ describe('Google GenAI integration', () => { description: 'models blocked-model stream-response', op: 'gen_ai.models', origin: 'auto.ai.google_genai', - status: 'unknown_error', + status: 'internal_error', }), // Fifth span - error handling for streaming expect.objectContaining({ @@ -450,7 +450,7 @@ describe('Google GenAI integration', () => { description: 'models blocked-model stream-response', op: 'gen_ai.models', origin: 'auto.ai.google_genai', - status: 'unknown_error', + status: 'internal_error', }), // Fifth span - error handling for streaming with PII expect.objectContaining({ diff --git a/dev-packages/node-integration-tests/suites/tracing/openai/test.ts b/dev-packages/node-integration-tests/suites/tracing/openai/test.ts index c0c0b79e95f7..35dd46f346c4 100644 --- a/dev-packages/node-integration-tests/suites/tracing/openai/test.ts +++ b/dev-packages/node-integration-tests/suites/tracing/openai/test.ts @@ -72,7 +72,7 @@ describe('OpenAI integration', () => { description: 'chat error-model', op: 'gen_ai.chat', origin: 'auto.ai.openai', - status: 'unknown_error', + status: 'internal_error', }), // Fourth span - chat completions streaming expect.objectContaining({ @@ -219,7 +219,7 @@ describe('OpenAI integration', () => { description: 'chat error-model', op: 'gen_ai.chat', origin: 'auto.ai.openai', - status: 'unknown_error', + status: 'internal_error', }), // Fourth span - chat completions streaming with PII expect.objectContaining({ diff --git a/dev-packages/node-integration-tests/suites/tracing/postgresjs/test.ts b/dev-packages/node-integration-tests/suites/tracing/postgresjs/test.ts index 68b1a82703a0..99203fd75ae6 100644 --- a/dev-packages/node-integration-tests/suites/tracing/postgresjs/test.ts +++ b/dev-packages/node-integration-tests/suites/tracing/postgresjs/test.ts @@ -175,7 +175,7 @@ describe('postgresjs auto instrumentation', () => { }), description: `SELECT * FROM "User" WHERE "email" = '${NON_EXISTING_TEST_EMAIL}'`, op: 'db', - status: 'unknown_error', + status: 'internal_error', origin: 'auto.db.otel.postgres', parent_span_id: expect.any(String), span_id: expect.any(String), From 7484f018ee2b8174ea66174f5b99483b38f4a464 Mon Sep 17 00:00:00 2001 From: Lukas Stracke Date: Thu, 16 Oct 2025 14:37:56 +0200 Subject: [PATCH 5/5] moar test fixes --- .../nestjs-11/tests/transactions.test.ts | 2 +- .../test-applications/nestjs-8/tests/transactions.test.ts | 2 +- .../nestjs-basic/tests/transactions.test.ts | 2 +- .../nestjs-fastify/tests/transactions.test.ts | 2 +- .../nextjs-app-dir/tests/route-handlers.test.ts | 2 +- .../nextjs-pages-dir/tests/edge-route.test.ts | 2 +- .../nextjs-pages-dir/tests/middleware.test.ts | 2 +- .../node-express/tests/transactions.test.ts | 2 +- .../node-otel-sdk-node/tests/transactions.test.ts | 2 +- .../node-otel/tests/transactions.test.ts | 2 +- .../tsx-express/tests/transactions.test.ts | 2 +- .../suites/fs-instrumentation/test.ts | 2 +- .../suites/tracing/apollo-graphql/test.ts | 2 +- .../suites/tracing/vercelai/test.ts | 8 ++++---- .../suites/tracing/vercelai/v5/test.ts | 2 +- 15 files changed, 18 insertions(+), 18 deletions(-) diff --git a/dev-packages/e2e-tests/test-applications/nestjs-11/tests/transactions.test.ts b/dev-packages/e2e-tests/test-applications/nestjs-11/tests/transactions.test.ts index 2f314a10817d..d0f34311822e 100644 --- a/dev-packages/e2e-tests/test-applications/nestjs-11/tests/transactions.test.ts +++ b/dev-packages/e2e-tests/test-applications/nestjs-11/tests/transactions.test.ts @@ -339,7 +339,7 @@ test('API route transaction includes nest pipe span for invalid request', async parent_span_id: expect.stringMatching(/[a-f0-9]{16}/), start_timestamp: expect.any(Number), timestamp: expect.any(Number), - status: 'unknown_error', + status: 'internal_error', op: 'middleware.nestjs', origin: 'auto.middleware.nestjs', }, diff --git a/dev-packages/e2e-tests/test-applications/nestjs-8/tests/transactions.test.ts b/dev-packages/e2e-tests/test-applications/nestjs-8/tests/transactions.test.ts index a7d5ed887049..f5f1c64a9726 100644 --- a/dev-packages/e2e-tests/test-applications/nestjs-8/tests/transactions.test.ts +++ b/dev-packages/e2e-tests/test-applications/nestjs-8/tests/transactions.test.ts @@ -343,7 +343,7 @@ test('API route transaction includes nest pipe span for invalid request', async parent_span_id: expect.stringMatching(/[a-f0-9]{16}/), start_timestamp: expect.any(Number), timestamp: expect.any(Number), - status: 'unknown_error', + status: 'internal_error', op: 'middleware.nestjs', origin: 'auto.middleware.nestjs', }, diff --git a/dev-packages/e2e-tests/test-applications/nestjs-basic/tests/transactions.test.ts b/dev-packages/e2e-tests/test-applications/nestjs-basic/tests/transactions.test.ts index 143ebcd9a9f0..508c1e670946 100644 --- a/dev-packages/e2e-tests/test-applications/nestjs-basic/tests/transactions.test.ts +++ b/dev-packages/e2e-tests/test-applications/nestjs-basic/tests/transactions.test.ts @@ -339,7 +339,7 @@ test('API route transaction includes nest pipe span for invalid request', async parent_span_id: expect.stringMatching(/[a-f0-9]{16}/), start_timestamp: expect.any(Number), timestamp: expect.any(Number), - status: 'unknown_error', + status: 'internal_error', op: 'middleware.nestjs', origin: 'auto.middleware.nestjs', }, diff --git a/dev-packages/e2e-tests/test-applications/nestjs-fastify/tests/transactions.test.ts b/dev-packages/e2e-tests/test-applications/nestjs-fastify/tests/transactions.test.ts index 9730bfd6fa68..d1c86bac4dfa 100644 --- a/dev-packages/e2e-tests/test-applications/nestjs-fastify/tests/transactions.test.ts +++ b/dev-packages/e2e-tests/test-applications/nestjs-fastify/tests/transactions.test.ts @@ -385,7 +385,7 @@ test('API route transaction includes nest pipe span for invalid request', async parent_span_id: expect.stringMatching(/[a-f0-9]{16}/), start_timestamp: expect.any(Number), timestamp: expect.any(Number), - status: 'unknown_error', + status: 'internal_error', op: 'middleware.nestjs', origin: 'auto.middleware.nestjs', }, diff --git a/dev-packages/e2e-tests/test-applications/nextjs-app-dir/tests/route-handlers.test.ts b/dev-packages/e2e-tests/test-applications/nextjs-app-dir/tests/route-handlers.test.ts index 946f9e20911a..5c92768015b0 100644 --- a/dev-packages/e2e-tests/test-applications/nextjs-app-dir/tests/route-handlers.test.ts +++ b/dev-packages/e2e-tests/test-applications/nextjs-app-dir/tests/route-handlers.test.ts @@ -112,7 +112,7 @@ test.describe('Edge runtime', () => { expect(routehandlerError.tags?.['my-isolated-tag']).toBe(true); expect(routehandlerError.tags?.['my-global-scope-isolated-tag']).not.toBeDefined(); - expect(routehandlerTransaction.contexts?.trace?.status).toBe('unknown_error'); + expect(routehandlerTransaction.contexts?.trace?.status).toBe('internal_error'); expect(routehandlerTransaction.contexts?.trace?.op).toBe('http.server'); expect(routehandlerError.exception?.values?.[0].value).toBe('route-handler-edge-error'); diff --git a/dev-packages/e2e-tests/test-applications/nextjs-pages-dir/tests/edge-route.test.ts b/dev-packages/e2e-tests/test-applications/nextjs-pages-dir/tests/edge-route.test.ts index d2ede428b978..8401c6a5f5d2 100644 --- a/dev-packages/e2e-tests/test-applications/nextjs-pages-dir/tests/edge-route.test.ts +++ b/dev-packages/e2e-tests/test-applications/nextjs-pages-dir/tests/edge-route.test.ts @@ -48,7 +48,7 @@ test('Faulty edge routes', async ({ request }) => { ]); test.step('should create transactions with the right fields', () => { - expect(edgerouteTransaction.contexts?.trace?.status).toBe('unknown_error'); + expect(edgerouteTransaction.contexts?.trace?.status).toBe('internal_error'); expect(edgerouteTransaction.contexts?.trace?.op).toBe('http.server'); }); diff --git a/dev-packages/e2e-tests/test-applications/nextjs-pages-dir/tests/middleware.test.ts b/dev-packages/e2e-tests/test-applications/nextjs-pages-dir/tests/middleware.test.ts index b9c0e7b4b602..52757c81b4e0 100644 --- a/dev-packages/e2e-tests/test-applications/nextjs-pages-dir/tests/middleware.test.ts +++ b/dev-packages/e2e-tests/test-applications/nextjs-pages-dir/tests/middleware.test.ts @@ -36,7 +36,7 @@ test('Faulty middlewares', async ({ request }) => { await test.step('should record transactions', async () => { const middlewareTransaction = await middlewareTransactionPromise; - expect(middlewareTransaction.contexts?.trace?.status).toBe('unknown_error'); + expect(middlewareTransaction.contexts?.trace?.status).toBe('internal_error'); expect(middlewareTransaction.contexts?.trace?.op).toBe('http.server.middleware'); expect(middlewareTransaction.contexts?.runtime?.name).toBe('vercel-edge'); expect(middlewareTransaction.transaction_info?.source).toBe('url'); diff --git a/dev-packages/e2e-tests/test-applications/node-express/tests/transactions.test.ts b/dev-packages/e2e-tests/test-applications/node-express/tests/transactions.test.ts index 1ffd9f2e498d..ce809b6ccdee 100644 --- a/dev-packages/e2e-tests/test-applications/node-express/tests/transactions.test.ts +++ b/dev-packages/e2e-tests/test-applications/node-express/tests/transactions.test.ts @@ -209,7 +209,7 @@ test('Sends an API route transaction for an errored route', async ({ baseURL }) parent_span_id: expect.stringMatching(/[a-f0-9]{16}/), span_id: expect.stringMatching(/[a-f0-9]{16}/), start_timestamp: expect.any(Number), - status: 'unknown_error', + status: 'internal_error', timestamp: expect.any(Number), trace_id: expect.stringMatching(/[a-f0-9]{32}/), measurements: {}, diff --git a/dev-packages/e2e-tests/test-applications/node-otel-sdk-node/tests/transactions.test.ts b/dev-packages/e2e-tests/test-applications/node-otel-sdk-node/tests/transactions.test.ts index a586146eece5..f724eee3fc64 100644 --- a/dev-packages/e2e-tests/test-applications/node-otel-sdk-node/tests/transactions.test.ts +++ b/dev-packages/e2e-tests/test-applications/node-otel-sdk-node/tests/transactions.test.ts @@ -203,7 +203,7 @@ test('Sends an API route transaction for an errored route', async ({ baseURL }) parent_span_id: expect.stringMatching(/[a-f0-9]{16}/), span_id: expect.stringMatching(/[a-f0-9]{16}/), start_timestamp: expect.any(Number), - status: 'unknown_error', + status: 'internal_error', timestamp: expect.any(Number), trace_id: expect.stringMatching(/[a-f0-9]{32}/), measurements: {}, diff --git a/dev-packages/e2e-tests/test-applications/node-otel/tests/transactions.test.ts b/dev-packages/e2e-tests/test-applications/node-otel/tests/transactions.test.ts index 1f79fd438719..8a561e91a76a 100644 --- a/dev-packages/e2e-tests/test-applications/node-otel/tests/transactions.test.ts +++ b/dev-packages/e2e-tests/test-applications/node-otel/tests/transactions.test.ts @@ -203,7 +203,7 @@ test('Sends an API route transaction for an errored route', async ({ baseURL }) parent_span_id: expect.stringMatching(/[a-f0-9]{16}/), span_id: expect.stringMatching(/[a-f0-9]{16}/), start_timestamp: expect.any(Number), - status: 'unknown_error', + status: 'internal_error', timestamp: expect.any(Number), trace_id: expect.stringMatching(/[a-f0-9]{32}/), measurements: {}, diff --git a/dev-packages/e2e-tests/test-applications/tsx-express/tests/transactions.test.ts b/dev-packages/e2e-tests/test-applications/tsx-express/tests/transactions.test.ts index fca8f1b85528..5957dbfd9738 100644 --- a/dev-packages/e2e-tests/test-applications/tsx-express/tests/transactions.test.ts +++ b/dev-packages/e2e-tests/test-applications/tsx-express/tests/transactions.test.ts @@ -195,7 +195,7 @@ test('Sends an API route transaction for an errored route', async ({ baseURL }) parent_span_id: expect.stringMatching(/[a-f0-9]{16}/), span_id: expect.stringMatching(/[a-f0-9]{16}/), start_timestamp: expect.any(Number), - status: 'unknown_error', + status: 'internal_error', measurements: {}, timestamp: expect.any(Number), trace_id: expect.stringMatching(/[a-f0-9]{32}/), diff --git a/dev-packages/node-integration-tests/suites/fs-instrumentation/test.ts b/dev-packages/node-integration-tests/suites/fs-instrumentation/test.ts index 721c569231a0..d64144754772 100644 --- a/dev-packages/node-integration-tests/suites/fs-instrumentation/test.ts +++ b/dev-packages/node-integration-tests/suites/fs-instrumentation/test.ts @@ -15,7 +15,7 @@ test('should create spans for fs operations that take target argument', async () expect.objectContaining({ description: 'fs.readFile', op: 'file', - status: 'unknown_error', + status: 'internal_error', data: { fs_error: expect.stringMatching('ENOENT: no such file or directory,'), path_argument: expect.stringMatching('/fixtures/some-file-that-doesnt-exist.txt'), diff --git a/dev-packages/node-integration-tests/suites/tracing/apollo-graphql/test.ts b/dev-packages/node-integration-tests/suites/tracing/apollo-graphql/test.ts index 4d6661101dc0..9de5308de385 100644 --- a/dev-packages/node-integration-tests/suites/tracing/apollo-graphql/test.ts +++ b/dev-packages/node-integration-tests/suites/tracing/apollo-graphql/test.ts @@ -68,7 +68,7 @@ describe('GraphQL/Apollo Tests', () => { 'sentry.origin': 'auto.graphql.otel.graphql', }, description: 'mutation Mutation', - status: 'unknown_error', + status: 'internal_error', origin: 'auto.graphql.otel.graphql', }), ]), diff --git a/dev-packages/node-integration-tests/suites/tracing/vercelai/test.ts b/dev-packages/node-integration-tests/suites/tracing/vercelai/test.ts index 94fd0dde8486..aac243eff11c 100644 --- a/dev-packages/node-integration-tests/suites/tracing/vercelai/test.ts +++ b/dev-packages/node-integration-tests/suites/tracing/vercelai/test.ts @@ -442,7 +442,7 @@ describe('Vercel AI integration', () => { description: 'generateText', op: 'gen_ai.invoke_agent', origin: 'auto.vercelai.otel', - status: 'unknown_error', + status: 'internal_error', }), expect.objectContaining({ data: { @@ -486,7 +486,7 @@ describe('Vercel AI integration', () => { description: 'execute_tool getWeather', op: 'gen_ai.execute_tool', origin: 'auto.vercelai.otel', - status: 'unknown_error', + status: 'internal_error', }), ]), @@ -563,7 +563,7 @@ describe('Vercel AI integration', () => { description: 'generateText', op: 'gen_ai.invoke_agent', origin: 'auto.vercelai.otel', - status: 'unknown_error', + status: 'internal_error', }), expect.objectContaining({ data: { @@ -607,7 +607,7 @@ describe('Vercel AI integration', () => { description: 'execute_tool getWeather', op: 'gen_ai.execute_tool', origin: 'auto.vercelai.otel', - status: 'unknown_error', + status: 'internal_error', }), ]), diff --git a/dev-packages/node-integration-tests/suites/tracing/vercelai/v5/test.ts b/dev-packages/node-integration-tests/suites/tracing/vercelai/v5/test.ts index 2b697bfedbdb..b5a2b8107326 100644 --- a/dev-packages/node-integration-tests/suites/tracing/vercelai/v5/test.ts +++ b/dev-packages/node-integration-tests/suites/tracing/vercelai/v5/test.ts @@ -499,7 +499,7 @@ describe('Vercel AI integration (V5)', () => { description: 'execute_tool getWeather', op: 'gen_ai.execute_tool', origin: 'auto.vercelai.otel', - status: 'unknown_error', + status: 'internal_error', }), ]), };