Skip to content

Commit 7a670ae

Browse files
committed
feat(v8/core): Remove deprecated setHttpStatus
1 parent c4acfe9 commit 7a670ae

File tree

3 files changed

+0
-25
lines changed

3 files changed

+0
-25
lines changed

packages/core/src/tracing/sentrySpan.ts

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -405,15 +405,6 @@ export class SentrySpan implements SpanInterface {
405405
return this;
406406
}
407407

408-
/**
409-
* @inheritDoc
410-
* @deprecated Use top-level `setHttpStatus()` instead.
411-
*/
412-
public setHttpStatus(httpStatus: number): this {
413-
setHttpStatus(this, httpStatus);
414-
return this;
415-
}
416-
417408
/**
418409
* @inheritDoc
419410
*/

packages/tracing/test/span.test.ts

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -114,15 +114,6 @@ describe('SentrySpan', () => {
114114
span.setStatus('permission_denied');
115115
expect((span.getTraceContext() as any).status).toBe('permission_denied');
116116
});
117-
118-
// TODO (v8): Remove
119-
test('setHttpStatus', () => {
120-
const span = new SentrySpan({});
121-
span.setHttpStatus(404);
122-
expect((span.getTraceContext() as any).status).toBe('not_found');
123-
expect(span.tags['http.status_code']).toBe('404');
124-
expect(span.data['http.response.status_code']).toBe(404);
125-
});
126117
});
127118

128119
describe('toJSON', () => {

packages/types/src/span.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -310,13 +310,6 @@ export interface Span extends Omit<SpanContext, 'name' | 'op' | 'status' | 'orig
310310
*/
311311
setStatus(status: string): this;
312312

313-
/**
314-
* Sets the status attribute on the current span based on the http code
315-
* @param httpStatus http code used to set the status
316-
* @deprecated Use top-level `setHttpStatus()` instead.
317-
*/
318-
setHttpStatus(httpStatus: number): this;
319-
320313
/**
321314
* Update the name of the span.
322315
*/

0 commit comments

Comments
 (0)