Skip to content

Commit eaec339

Browse files
committed
chore: remove sentry status explicit set to rely on a global approach in #21811
1 parent 0b79ae5 commit eaec339

2 files changed

Lines changed: 1 addition & 6 deletions

File tree

packages/server-utils/src/tracing-channel.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import type { AsyncLocalStorage } from 'node:async_hooks';
33
import type { ExclusiveEventHintOrCaptureContext, Span } from '@sentry/core';
44
import { debug, captureException, SPAN_STATUS_ERROR, getAsyncContextStrategy, getMainCarrier } from '@sentry/core';
55
import { DEBUG_BUILD } from './debug-build';
6-
import { ERROR_TYPE, SENTRY_STATUS_MESSAGE } from '@sentry/conventions/attributes';
6+
import { ERROR_TYPE } from '@sentry/conventions/attributes';
77

88
export type TracingChannelPayloadWithSpan<TData extends object> = TData & {
99
_sentrySpan?: Span;
@@ -208,7 +208,6 @@ function getErrorInfo(error: unknown): ErrorInfo {
208208
message,
209209
attributes: {
210210
[ERROR_TYPE]: type,
211-
[SENTRY_STATUS_MESSAGE]: message,
212211
},
213212
};
214213
}

packages/server-utils/test/tracing-channel.test.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,6 @@ describe('bindTracingChannelToSpan', () => {
387387
const { status, data } = spanToJSON(span);
388388
expect(status).toBe('bad input');
389389
expect(data['error.type']).toBe('TypeError');
390-
expect(data['sentry.status.message']).toBe('bad input');
391390
});
392391

393392
it('stringifies a thrown primitive and marks the type unknown', () => {
@@ -405,7 +404,6 @@ describe('bindTracingChannelToSpan', () => {
405404
const { status, data } = spanToJSON(span);
406405
expect(status).toBe('plain failure');
407406
expect(data['error.type']).toBe('unknown');
408-
expect(data['sentry.status.message']).toBe('plain failure');
409407
});
410408

411409
it('falls back to unknown_error for an error-like object without `name` or `message`', () => {
@@ -423,7 +421,6 @@ describe('bindTracingChannelToSpan', () => {
423421
const { status, data } = spanToJSON(span);
424422
expect(status).toBe('unknown_error');
425423
expect(data['error.type']).toBe('unknown');
426-
expect(data['sentry.status.message']).toBe('unknown_error');
427424
});
428425

429426
it('falls back to unknown_error when a falsy value is thrown', () => {
@@ -445,7 +442,6 @@ describe('bindTracingChannelToSpan', () => {
445442
const { status, data } = spanToJSON(span);
446443
expect(status).toBe('unknown_error');
447444
expect(data['error.type']).toBe('unknown');
448-
expect(data['sentry.status.message']).toBe('unknown_error');
449445
});
450446
});
451447
});

0 commit comments

Comments
 (0)