Skip to content

Commit ec7cc54

Browse files
committed
deprecate status on interface
1 parent 09a7a37 commit ec7cc54

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

packages/node/test/handlers.test.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,9 @@ describe('tracingHandler', () => {
382382

383383
setImmediate(() => {
384384
expect(finishTransaction).toHaveBeenCalled();
385+
// eslint-disable-next-line deprecation/deprecation
385386
expect(transaction.status).toBe('ok');
387+
expect(spanToJSON(transaction).status).toBe('ok');
386388
// eslint-disable-next-line deprecation/deprecation
387389
expect(transaction.tags).toEqual(expect.objectContaining({ 'http.status_code': '200' }));
388390
expect(spanToJSON(transaction).data).toEqual(expect.objectContaining({ 'http.response.status_code': 200 }));

packages/types/src/span.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,15 @@ export interface Span extends SpanContext {
234234
*/
235235
instrumenter: Instrumenter;
236236

237+
/**
238+
* Completion status of the Span.
239+
*
240+
* See: {@sentry/tracing SpanStatus} for possible values
241+
*
242+
* @deprecated Use `.setStatus` to set or update and `spanToJSON()` to read the status.
243+
*/
244+
status?: string;
245+
237246
/**
238247
* Get context data for this span.
239248
* This includes the spanId & the traceId.

0 commit comments

Comments
 (0)