Skip to content

feat(v8): Remove deprecated spanStatusfromHttpCode export #10563

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions MIGRATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions packages/astro/src/index.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@ export {
setTag,
setTags,
setUser,
// eslint-disable-next-line deprecation/deprecation
spanStatusfromHttpCode,
getSpanStatusFromHttpCode,
setHttpStatus,
// eslint-disable-next-line deprecation/deprecation
Expand Down
2 changes: 0 additions & 2 deletions packages/browser/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions packages/bun/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,6 @@ export {
setTag,
setTags,
setUser,
// eslint-disable-next-line deprecation/deprecation
spanStatusfromHttpCode,
getSpanStatusFromHttpCode,
setHttpStatus,
// eslint-disable-next-line deprecation/deprecation
Expand Down
2 changes: 0 additions & 2 deletions packages/core/src/tracing/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
11 changes: 0 additions & 11 deletions packages/core/src/tracing/spanstatus.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 0 additions & 2 deletions packages/deno/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,6 @@ export {
setTag,
setTags,
setUser,
// eslint-disable-next-line deprecation/deprecation
spanStatusfromHttpCode,
getSpanStatusFromHttpCode,
setHttpStatus,
// eslint-disable-next-line deprecation/deprecation
Expand Down
2 changes: 0 additions & 2 deletions packages/node-experimental/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,6 @@ export {
Hub,
runWithAsyncContext,
SDK_VERSION,
// eslint-disable-next-line deprecation/deprecation
spanStatusfromHttpCode,
getSpanStatusFromHttpCode,
setHttpStatus,
// eslint-disable-next-line deprecation/deprecation
Expand Down
2 changes: 0 additions & 2 deletions packages/node/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,6 @@ export {
setTag,
setTags,
setUser,
// eslint-disable-next-line deprecation/deprecation
spanStatusfromHttpCode,
getSpanStatusFromHttpCode,
setHttpStatus,
// eslint-disable-next-line deprecation/deprecation
Expand Down
2 changes: 0 additions & 2 deletions packages/remix/src/index.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,6 @@ export {
setTag,
setTags,
setUser,
// eslint-disable-next-line deprecation/deprecation
spanStatusfromHttpCode,
getSpanStatusFromHttpCode,
setHttpStatus,
// eslint-disable-next-line deprecation/deprecation
Expand Down
2 changes: 0 additions & 2 deletions packages/serverless/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@ export {
getGlobalScope,
getIsolationScope,
getHubFromCarrier,
// eslint-disable-next-line deprecation/deprecation
spanStatusfromHttpCode,
getSpanStatusFromHttpCode,
setHttpStatus,
// eslint-disable-next-line deprecation/deprecation
Expand Down
2 changes: 0 additions & 2 deletions packages/sveltekit/src/server/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,6 @@ export {
setTag,
setTags,
setUser,
// eslint-disable-next-line deprecation/deprecation
spanStatusfromHttpCode,
getSpanStatusFromHttpCode,
setHttpStatus,
// eslint-disable-next-line deprecation/deprecation
Expand Down
2 changes: 0 additions & 2 deletions packages/tracing-internal/src/exports/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
9 changes: 0 additions & 9 deletions packages/tracing/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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.
*
Expand Down
2 changes: 0 additions & 2 deletions packages/vercel-edge/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,6 @@ export {
setTag,
setTags,
setUser,
// eslint-disable-next-line deprecation/deprecation
spanStatusfromHttpCode,
getSpanStatusFromHttpCode,
setHttpStatus,
// eslint-disable-next-line deprecation/deprecation
Expand Down