Skip to content

Commit 737fb0e

Browse files
authored
feat(v8): Remove deprecated spanStatusfromHttpCode export (#10563)
Small removal for `spanStatusfromHttpCode`!
1 parent 8b2569b commit 737fb0e

File tree

15 files changed

+4
-44
lines changed

15 files changed

+4
-44
lines changed

MIGRATION.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ enum. If you were using the `Severity` enum, you should replace it with the `Sev
1111
The `Offline` integration has been removed in favor of the offline transport wrapper:
1212
http://docs.sentry.io/platforms/javascript/configuration/transports/#offline-caching
1313

14+
## Other changes
15+
16+
- Remove `spanStatusfromHttpCode` in favour of `getSpanStatusFromHttpCode` (#10361)
17+
1418
# Deprecations in 7.x
1519

1620
You can use the **Experimental** [@sentry/migr8](https://www.npmjs.com/package/@sentry/migr8) to automatically update

packages/astro/src/index.server.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,6 @@ export {
4646
setTag,
4747
setTags,
4848
setUser,
49-
// eslint-disable-next-line deprecation/deprecation
50-
spanStatusfromHttpCode,
5149
getSpanStatusFromHttpCode,
5250
setHttpStatus,
5351
// eslint-disable-next-line deprecation/deprecation

packages/browser/src/index.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,6 @@ export {
7171
extractTraceparentData,
7272
// eslint-disable-next-line deprecation/deprecation
7373
getActiveTransaction,
74-
// eslint-disable-next-line deprecation/deprecation
75-
spanStatusfromHttpCode,
7674
getSpanStatusFromHttpCode,
7775
setHttpStatus,
7876
// eslint-disable-next-line deprecation/deprecation

packages/bun/src/index.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,6 @@ export {
6464
setTag,
6565
setTags,
6666
setUser,
67-
// eslint-disable-next-line deprecation/deprecation
68-
spanStatusfromHttpCode,
6967
getSpanStatusFromHttpCode,
7068
setHttpStatus,
7169
// eslint-disable-next-line deprecation/deprecation

packages/core/src/tracing/index.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ export { extractTraceparentData, getActiveTransaction } from './utils';
99
export { SpanStatus } from './spanstatus';
1010
export {
1111
setHttpStatus,
12-
// eslint-disable-next-line deprecation/deprecation
13-
spanStatusfromHttpCode,
1412
getSpanStatusFromHttpCode,
1513
} from './spanstatus';
1614
export type { SpanStatusType } from './spanstatus';

packages/core/src/tracing/spanstatus.ts

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -123,17 +123,6 @@ export function getSpanStatusFromHttpCode(httpStatus: number): SpanStatusType {
123123
return 'unknown_error';
124124
}
125125

126-
/**
127-
* Converts a HTTP status code into a {@link SpanStatusType}.
128-
*
129-
* @deprecated Use {@link spanStatusFromHttpCode} instead.
130-
* This export will be removed in v8 as the signature contains a typo.
131-
*
132-
* @param httpStatus The HTTP response status code.
133-
* @returns The span status or unknown_error.
134-
*/
135-
export const spanStatusfromHttpCode = getSpanStatusFromHttpCode;
136-
137126
/**
138127
* Sets the Http status attributes on the current span based on the http code.
139128
* Additionally, the span's status is updated, depending on the http code.

packages/deno/src/index.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,6 @@ export {
6363
setTag,
6464
setTags,
6565
setUser,
66-
// eslint-disable-next-line deprecation/deprecation
67-
spanStatusfromHttpCode,
6866
getSpanStatusFromHttpCode,
6967
setHttpStatus,
7068
// eslint-disable-next-line deprecation/deprecation

packages/node-experimental/src/index.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,6 @@ export {
7676
Hub,
7777
runWithAsyncContext,
7878
SDK_VERSION,
79-
// eslint-disable-next-line deprecation/deprecation
80-
spanStatusfromHttpCode,
8179
getSpanStatusFromHttpCode,
8280
setHttpStatus,
8381
// eslint-disable-next-line deprecation/deprecation

packages/node/src/index.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,6 @@ export {
6363
setTag,
6464
setTags,
6565
setUser,
66-
// eslint-disable-next-line deprecation/deprecation
67-
spanStatusfromHttpCode,
6866
getSpanStatusFromHttpCode,
6967
setHttpStatus,
7068
// eslint-disable-next-line deprecation/deprecation

packages/remix/src/index.server.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,6 @@ export {
5050
setTag,
5151
setTags,
5252
setUser,
53-
// eslint-disable-next-line deprecation/deprecation
54-
spanStatusfromHttpCode,
5553
getSpanStatusFromHttpCode,
5654
setHttpStatus,
5755
// eslint-disable-next-line deprecation/deprecation

packages/serverless/src/index.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,6 @@ export {
3838
getGlobalScope,
3939
getIsolationScope,
4040
getHubFromCarrier,
41-
// eslint-disable-next-line deprecation/deprecation
42-
spanStatusfromHttpCode,
4341
getSpanStatusFromHttpCode,
4442
setHttpStatus,
4543
// eslint-disable-next-line deprecation/deprecation

packages/sveltekit/src/server/index.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,6 @@ export {
4444
setTag,
4545
setTags,
4646
setUser,
47-
// eslint-disable-next-line deprecation/deprecation
48-
spanStatusfromHttpCode,
4947
getSpanStatusFromHttpCode,
5048
setHttpStatus,
5149
// eslint-disable-next-line deprecation/deprecation

packages/tracing-internal/src/exports/index.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ export {
88
Span,
99
// eslint-disable-next-line deprecation/deprecation
1010
SpanStatus,
11-
// eslint-disable-next-line deprecation/deprecation
12-
spanStatusfromHttpCode,
1311
startIdleTransaction,
1412
Transaction,
1513
} from '@sentry/core';

packages/tracing/src/index.ts

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ import {
2323
getActiveTransaction as getActiveTransactionT,
2424
hasTracingEnabled as hasTracingEnabledT,
2525
instrumentOutgoingRequests as instrumentOutgoingRequestsT,
26-
spanStatusfromHttpCode as spanStatusfromHttpCodeT,
2726
startIdleTransaction as startIdleTransactionT,
2827
stripUrlQueryAndFragment as stripUrlQueryAndFragmentT,
2928
} from '@sentry-internal/tracing';
@@ -75,14 +74,6 @@ export const getActiveTransaction = getActiveTransactionT;
7574
// eslint-disable-next-line deprecation/deprecation
7675
export const extractTraceparentData = extractTraceparentDataT;
7776

78-
/**
79-
* @deprecated `@sentry/tracing` has been deprecated and will be moved to to `@sentry/node`, `@sentry/browser`, or your framework SDK in the next major version.
80-
*
81-
* `spanStatusfromHttpCode` can be imported from `@sentry/node`, `@sentry/browser`, or your framework SDK
82-
*/
83-
// eslint-disable-next-line deprecation/deprecation
84-
export const spanStatusfromHttpCode = spanStatusfromHttpCodeT;
85-
8677
/**
8778
* @deprecated `@sentry/tracing` has been deprecated and will be moved to to `@sentry/node`, `@sentry/browser`, or your framework SDK in the next major version.
8879
*

packages/vercel-edge/src/index.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,6 @@ export {
6363
setTag,
6464
setTags,
6565
setUser,
66-
// eslint-disable-next-line deprecation/deprecation
67-
spanStatusfromHttpCode,
6866
getSpanStatusFromHttpCode,
6967
setHttpStatus,
7068
// eslint-disable-next-line deprecation/deprecation

0 commit comments

Comments
 (0)