Skip to content

Commit 3b9c37e

Browse files
authored
feat(v8): Remove deprecated span.isSuccess method (#10699)
ref #10677 deprecation PR: #10213
1 parent 3a4683e commit 3b9c37e

File tree

3 files changed

+0
-41
lines changed

3 files changed

+0
-41
lines changed

packages/core/src/tracing/sentrySpan.ts

-9
Original file line numberDiff line numberDiff line change
@@ -503,15 +503,6 @@ export class SentrySpan implements SpanInterface {
503503
return this;
504504
}
505505

506-
/**
507-
* @inheritDoc
508-
*
509-
* @deprecated Use `spanToJSON(span).status === 'ok'` instead.
510-
*/
511-
public isSuccess(): boolean {
512-
return this._status === 'ok';
513-
}
514-
515506
/**
516507
* @inheritDoc
517508
*

packages/tracing/test/span.test.ts

-25
Original file line numberDiff line numberDiff line change
@@ -123,31 +123,6 @@ describe('SentrySpan', () => {
123123
expect(span.tags['http.status_code']).toBe('404');
124124
expect(span.data['http.response.status_code']).toBe(404);
125125
});
126-
127-
// TODO (v8): Remove
128-
test('isSuccess', () => {
129-
const span = new SentrySpan({});
130-
expect(span.isSuccess()).toBe(false);
131-
expect(spanToJSON(span).status).not.toBe('ok');
132-
span.setHttpStatus(200);
133-
expect(span.isSuccess()).toBe(true);
134-
expect(spanToJSON(span).status).toBe('ok');
135-
span.setStatus('permission_denied');
136-
expect(span.isSuccess()).toBe(false);
137-
expect(spanToJSON(span).status).not.toBe('ok');
138-
span.setHttpStatus(0);
139-
expect(span.isSuccess()).toBe(false);
140-
expect(spanToJSON(span).status).not.toBe('ok');
141-
span.setHttpStatus(-1);
142-
expect(span.isSuccess()).toBe(false);
143-
expect(spanToJSON(span).status).not.toBe('ok');
144-
span.setHttpStatus(99);
145-
expect(span.isSuccess()).toBe(false);
146-
expect(spanToJSON(span).status).not.toBe('ok');
147-
span.setHttpStatus(100);
148-
expect(span.isSuccess()).toBe(true);
149-
expect(spanToJSON(span).status).toBe('ok');
150-
});
151126
});
152127

153128
describe('toTraceparent', () => {

packages/types/src/span.ts

-7
Original file line numberDiff line numberDiff line change
@@ -365,13 +365,6 @@ export interface Span extends Omit<SpanContext, 'op' | 'status' | 'origin'> {
365365
*/
366366
startChild(spanContext?: Pick<SpanContext, Exclude<keyof SpanContext, 'sampled' | 'traceId' | 'parentSpanId'>>): Span;
367367

368-
/**
369-
* Determines whether span was successful (HTTP200)
370-
*
371-
* @deprecated Use `spanToJSON(span).status === 'ok'` instead.
372-
*/
373-
isSuccess(): boolean;
374-
375368
/**
376369
* Return a traceparent compatible header string.
377370
* @deprecated Use `spanToTraceHeader()` instead.

0 commit comments

Comments
 (0)