Skip to content

Commit

Permalink
feat(v8): Remove deprecated spanStatusfromHttpCode export (#10563)
Browse files Browse the repository at this point in the history
Small removal for `spanStatusfromHttpCode`!
  • Loading branch information
AbhiPrasad authored Feb 8, 2024
1 parent 8b2569b commit 737fb0e
Show file tree
Hide file tree
Showing 15 changed files with 4 additions and 44 deletions.
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 @@ -76,8 +76,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

0 comments on commit 737fb0e

Please sign in to comment.