File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -382,7 +382,9 @@ describe('tracingHandler', () => {
382
382
383
383
setImmediate ( ( ) => {
384
384
expect ( finishTransaction ) . toHaveBeenCalled ( ) ;
385
+ // eslint-disable-next-line deprecation/deprecation
385
386
expect ( transaction . status ) . toBe ( 'ok' ) ;
387
+ expect ( spanToJSON ( transaction ) . status ) . toBe ( 'ok' ) ;
386
388
// eslint-disable-next-line deprecation/deprecation
387
389
expect ( transaction . tags ) . toEqual ( expect . objectContaining ( { 'http.status_code' : '200' } ) ) ;
388
390
expect ( spanToJSON ( transaction ) . data ) . toEqual ( expect . objectContaining ( { 'http.response.status_code' : 200 } ) ) ;
Original file line number Diff line number Diff line change @@ -234,6 +234,15 @@ export interface Span extends SpanContext {
234
234
*/
235
235
instrumenter : Instrumenter ;
236
236
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
+
237
246
/**
238
247
* Get context data for this span.
239
248
* This includes the spanId & the traceId.
You can’t perform that action at this time.
0 commit comments