From d1ee34a03f0ad4011f9ecea82ed3327990a8628d Mon Sep 17 00:00:00 2001 From: Abhijeet Prasad Date: Wed, 7 Feb 2024 17:13:51 -0500 Subject: [PATCH] feat(v8): Remove deprecated spanStatusfromHttpCode export --- MIGRATION.md | 4 ++++ packages/astro/src/index.server.ts | 2 -- packages/browser/src/index.ts | 2 -- packages/bun/src/index.ts | 2 -- packages/core/src/tracing/index.ts | 2 -- packages/core/src/tracing/spanstatus.ts | 11 ----------- packages/deno/src/index.ts | 2 -- packages/node-experimental/src/index.ts | 2 -- packages/node/src/index.ts | 2 -- packages/remix/src/index.server.ts | 2 -- packages/serverless/src/index.ts | 2 -- packages/sveltekit/src/server/index.ts | 2 -- packages/tracing-internal/src/exports/index.ts | 2 -- packages/tracing/src/index.ts | 9 --------- packages/vercel-edge/src/index.ts | 2 -- 15 files changed, 4 insertions(+), 44 deletions(-) diff --git a/MIGRATION.md b/MIGRATION.md index f975b13c0f4d..1e9c993e7cd1 100644 --- a/MIGRATION.md +++ b/MIGRATION.md @@ -11,6 +11,10 @@ enum. If you were using the `Severity` enum, you should replace it with the `Sev The `Offline` integration has been removed in favor of the offline transport wrapper: http://docs.sentry.io/platforms/javascript/configuration/transports/#offline-caching +## Other changes + +- Remove `spanStatusfromHttpCode` in favour of `getSpanStatusFromHttpCode` (#10361) + # Deprecations in 7.x You can use the **Experimental** [@sentry/migr8](https://www.npmjs.com/package/@sentry/migr8) to automatically update diff --git a/packages/astro/src/index.server.ts b/packages/astro/src/index.server.ts index 98e5486894db..16cda41454ef 100644 --- a/packages/astro/src/index.server.ts +++ b/packages/astro/src/index.server.ts @@ -46,8 +46,6 @@ export { setTag, setTags, setUser, - // eslint-disable-next-line deprecation/deprecation - spanStatusfromHttpCode, getSpanStatusFromHttpCode, setHttpStatus, // eslint-disable-next-line deprecation/deprecation diff --git a/packages/browser/src/index.ts b/packages/browser/src/index.ts index 59ef74cdbfb5..39a2d32fd0d8 100644 --- a/packages/browser/src/index.ts +++ b/packages/browser/src/index.ts @@ -71,8 +71,6 @@ export { extractTraceparentData, // eslint-disable-next-line deprecation/deprecation getActiveTransaction, - // eslint-disable-next-line deprecation/deprecation - spanStatusfromHttpCode, getSpanStatusFromHttpCode, setHttpStatus, // eslint-disable-next-line deprecation/deprecation diff --git a/packages/bun/src/index.ts b/packages/bun/src/index.ts index f1958c53404d..1739ec695e5e 100644 --- a/packages/bun/src/index.ts +++ b/packages/bun/src/index.ts @@ -64,8 +64,6 @@ export { setTag, setTags, setUser, - // eslint-disable-next-line deprecation/deprecation - spanStatusfromHttpCode, getSpanStatusFromHttpCode, setHttpStatus, // eslint-disable-next-line deprecation/deprecation diff --git a/packages/core/src/tracing/index.ts b/packages/core/src/tracing/index.ts index d1e1c7f65b44..c45389da53c6 100644 --- a/packages/core/src/tracing/index.ts +++ b/packages/core/src/tracing/index.ts @@ -9,8 +9,6 @@ export { extractTraceparentData, getActiveTransaction } from './utils'; export { SpanStatus } from './spanstatus'; export { setHttpStatus, - // eslint-disable-next-line deprecation/deprecation - spanStatusfromHttpCode, getSpanStatusFromHttpCode, } from './spanstatus'; export type { SpanStatusType } from './spanstatus'; diff --git a/packages/core/src/tracing/spanstatus.ts b/packages/core/src/tracing/spanstatus.ts index aa0d1639a70c..7ccb4883169c 100644 --- a/packages/core/src/tracing/spanstatus.ts +++ b/packages/core/src/tracing/spanstatus.ts @@ -123,17 +123,6 @@ export function getSpanStatusFromHttpCode(httpStatus: number): SpanStatusType { return 'unknown_error'; } -/** - * Converts a HTTP status code into a {@link SpanStatusType}. - * - * @deprecated Use {@link spanStatusFromHttpCode} instead. - * This export will be removed in v8 as the signature contains a typo. - * - * @param httpStatus The HTTP response status code. - * @returns The span status or unknown_error. - */ -export const spanStatusfromHttpCode = getSpanStatusFromHttpCode; - /** * Sets the Http status attributes on the current span based on the http code. * Additionally, the span's status is updated, depending on the http code. diff --git a/packages/deno/src/index.ts b/packages/deno/src/index.ts index 82ce6004ece6..0d0e357737ac 100644 --- a/packages/deno/src/index.ts +++ b/packages/deno/src/index.ts @@ -63,8 +63,6 @@ export { setTag, setTags, setUser, - // eslint-disable-next-line deprecation/deprecation - spanStatusfromHttpCode, getSpanStatusFromHttpCode, setHttpStatus, // eslint-disable-next-line deprecation/deprecation diff --git a/packages/node-experimental/src/index.ts b/packages/node-experimental/src/index.ts index b5ffeb6de0c9..b98cb6cec4ac 100644 --- a/packages/node-experimental/src/index.ts +++ b/packages/node-experimental/src/index.ts @@ -78,8 +78,6 @@ export { Hub, runWithAsyncContext, SDK_VERSION, - // eslint-disable-next-line deprecation/deprecation - spanStatusfromHttpCode, getSpanStatusFromHttpCode, setHttpStatus, // eslint-disable-next-line deprecation/deprecation diff --git a/packages/node/src/index.ts b/packages/node/src/index.ts index 44630d871260..f1a585f03b7f 100644 --- a/packages/node/src/index.ts +++ b/packages/node/src/index.ts @@ -63,8 +63,6 @@ export { setTag, setTags, setUser, - // eslint-disable-next-line deprecation/deprecation - spanStatusfromHttpCode, getSpanStatusFromHttpCode, setHttpStatus, // eslint-disable-next-line deprecation/deprecation diff --git a/packages/remix/src/index.server.ts b/packages/remix/src/index.server.ts index a34250100287..b1278eeb4c14 100644 --- a/packages/remix/src/index.server.ts +++ b/packages/remix/src/index.server.ts @@ -50,8 +50,6 @@ export { setTag, setTags, setUser, - // eslint-disable-next-line deprecation/deprecation - spanStatusfromHttpCode, getSpanStatusFromHttpCode, setHttpStatus, // eslint-disable-next-line deprecation/deprecation diff --git a/packages/serverless/src/index.ts b/packages/serverless/src/index.ts index 24ee21115f0b..46afbab43fa9 100644 --- a/packages/serverless/src/index.ts +++ b/packages/serverless/src/index.ts @@ -38,8 +38,6 @@ export { getGlobalScope, getIsolationScope, getHubFromCarrier, - // eslint-disable-next-line deprecation/deprecation - spanStatusfromHttpCode, getSpanStatusFromHttpCode, setHttpStatus, // eslint-disable-next-line deprecation/deprecation diff --git a/packages/sveltekit/src/server/index.ts b/packages/sveltekit/src/server/index.ts index 7a886334cfbc..a3ada81a3c71 100644 --- a/packages/sveltekit/src/server/index.ts +++ b/packages/sveltekit/src/server/index.ts @@ -44,8 +44,6 @@ export { setTag, setTags, setUser, - // eslint-disable-next-line deprecation/deprecation - spanStatusfromHttpCode, getSpanStatusFromHttpCode, setHttpStatus, // eslint-disable-next-line deprecation/deprecation diff --git a/packages/tracing-internal/src/exports/index.ts b/packages/tracing-internal/src/exports/index.ts index 96cd3b85ac89..5111048de02a 100644 --- a/packages/tracing-internal/src/exports/index.ts +++ b/packages/tracing-internal/src/exports/index.ts @@ -8,8 +8,6 @@ export { Span, // eslint-disable-next-line deprecation/deprecation SpanStatus, - // eslint-disable-next-line deprecation/deprecation - spanStatusfromHttpCode, startIdleTransaction, Transaction, } from '@sentry/core'; diff --git a/packages/tracing/src/index.ts b/packages/tracing/src/index.ts index 24b1241af764..4f6b7fc41e87 100644 --- a/packages/tracing/src/index.ts +++ b/packages/tracing/src/index.ts @@ -23,7 +23,6 @@ import { getActiveTransaction as getActiveTransactionT, hasTracingEnabled as hasTracingEnabledT, instrumentOutgoingRequests as instrumentOutgoingRequestsT, - spanStatusfromHttpCode as spanStatusfromHttpCodeT, startIdleTransaction as startIdleTransactionT, stripUrlQueryAndFragment as stripUrlQueryAndFragmentT, } from '@sentry-internal/tracing'; @@ -75,14 +74,6 @@ export const getActiveTransaction = getActiveTransactionT; // eslint-disable-next-line deprecation/deprecation export const extractTraceparentData = extractTraceparentDataT; -/** - * @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. - * - * `spanStatusfromHttpCode` can be imported from `@sentry/node`, `@sentry/browser`, or your framework SDK - */ -// eslint-disable-next-line deprecation/deprecation -export const spanStatusfromHttpCode = spanStatusfromHttpCodeT; - /** * @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. * diff --git a/packages/vercel-edge/src/index.ts b/packages/vercel-edge/src/index.ts index 98910cbd754a..8a27be0f1156 100644 --- a/packages/vercel-edge/src/index.ts +++ b/packages/vercel-edge/src/index.ts @@ -63,8 +63,6 @@ export { setTag, setTags, setUser, - // eslint-disable-next-line deprecation/deprecation - spanStatusfromHttpCode, getSpanStatusFromHttpCode, setHttpStatus, // eslint-disable-next-line deprecation/deprecation