From 373bed102bd76e2928b0b7033a1823b4f95ef4a9 Mon Sep 17 00:00:00 2001 From: Abhijeet Prasad Date: Wed, 18 Dec 2024 11:13:48 -0500 Subject: [PATCH 1/2] feat(core)!: Remove BAGGAGE_HEADER_NAME export --- docs/migration/v8-to-v9.md | 1 + packages/core/src/utils-hoist/baggage.ts | 5 ----- packages/core/src/utils-hoist/index.ts | 2 -- packages/utils/src/index.ts | 5 ----- 4 files changed, 1 insertion(+), 12 deletions(-) diff --git a/docs/migration/v8-to-v9.md b/docs/migration/v8-to-v9.md index 0f92cab5bc93..12ebbcbd72be 100644 --- a/docs/migration/v8-to-v9.md +++ b/docs/migration/v8-to-v9.md @@ -106,6 +106,7 @@ It will be removed in a future major version. - The `getNumberOfUrlSegments` method has been removed. There is no replacement. - The `validSeverityLevels` export has been removed. There is no replacement. +- The `BAGGAGE_HEADER_NAME` export has been removed. There is no replacement. ### `@sentry/nestjs` diff --git a/packages/core/src/utils-hoist/baggage.ts b/packages/core/src/utils-hoist/baggage.ts index 5fb60af8a203..075dbf4389df 100644 --- a/packages/core/src/utils-hoist/baggage.ts +++ b/packages/core/src/utils-hoist/baggage.ts @@ -4,11 +4,6 @@ import { DEBUG_BUILD } from './debug-build'; import { isString } from './is'; import { logger } from './logger'; -/** - * @deprecated Use a `"baggage"` string directly - */ -export const BAGGAGE_HEADER_NAME = 'baggage'; - export const SENTRY_BAGGAGE_KEY_PREFIX = 'sentry-'; export const SENTRY_BAGGAGE_KEY_PREFIX_REGEX = /^sentry-/; diff --git a/packages/core/src/utils-hoist/index.ts b/packages/core/src/utils-hoist/index.ts index 4e1771ffb8fa..eb3dca472472 100644 --- a/packages/core/src/utils-hoist/index.ts +++ b/packages/core/src/utils-hoist/index.ts @@ -151,8 +151,6 @@ export { } from './ratelimit'; export type { RateLimits } from './ratelimit'; export { - // eslint-disable-next-line deprecation/deprecation - BAGGAGE_HEADER_NAME, MAX_BAGGAGE_STRING_LENGTH, SENTRY_BAGGAGE_KEY_PREFIX, SENTRY_BAGGAGE_KEY_PREFIX_REGEX, diff --git a/packages/utils/src/index.ts b/packages/utils/src/index.ts index f730b41b30fa..df7acf5744ec 100644 --- a/packages/utils/src/index.ts +++ b/packages/utils/src/index.ts @@ -1,6 +1,5 @@ /* eslint-disable max-lines */ import { - BAGGAGE_HEADER_NAME as BAGGAGE_HEADER_NAME_imported, CONSOLE_LEVELS as CONSOLE_LEVELS_imported, DEFAULT_RETRY_AFTER as DEFAULT_RETRY_AFTER_imported, DEFAULT_USER_INCLUDES as DEFAULT_USER_INCLUDES_imported, @@ -634,10 +633,6 @@ export const extractRequestData = extractRequestData_imported; // eslint-disable-next-line deprecation/deprecation export const addRequestDataToEvent = addRequestDataToEvent_imported; -/** @deprecated Import from `@sentry/core` instead. */ -// eslint-disable-next-line deprecation/deprecation -export const BAGGAGE_HEADER_NAME = BAGGAGE_HEADER_NAME_imported; - /** @deprecated Import from `@sentry/core` instead. */ export const getSanitizedUrlString = getSanitizedUrlString_imported; From 714c21bc8d36bc15daf769d59b742c808dc14508 Mon Sep 17 00:00:00 2001 From: Abhijeet Prasad Date: Wed, 18 Dec 2024 11:58:21 -0500 Subject: [PATCH 2/2] clarify baggage name replacement --- docs/migration/v8-to-v9.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/migration/v8-to-v9.md b/docs/migration/v8-to-v9.md index 3e21a3a32474..dfc9af94591b 100644 --- a/docs/migration/v8-to-v9.md +++ b/docs/migration/v8-to-v9.md @@ -107,7 +107,7 @@ It will be removed in a future major version. - The `getNumberOfUrlSegments` method has been removed. There is no replacement. - The `validSeverityLevels` export has been removed. There is no replacement. - The `arrayify` export has been removed. There is no replacement. -- The `BAGGAGE_HEADER_NAME` export has been removed. There is no replacement. +- The `BAGGAGE_HEADER_NAME` export has been removed. Use `"baggage"` string constant directly instead. ### `@sentry/nestjs` @@ -197,7 +197,7 @@ The Sentry metrics beta has ended and the metrics API has been removed from the - Deprecated `arrayify`. No replacements. - Deprecated `memoBuilder`. No replacements. - Deprecated `getNumberOfUrlSegments`. No replacements. -- Deprecated `BAGGAGE_HEADER_NAME`. No replacements. +- Deprecated `BAGGAGE_HEADER_NAME`. Use `"baggage"` string constant directly instead. - Deprecated `makeFifoCache`. No replacements. - Deprecated `dynamicRequire`. No replacements. - Deprecated `flatten`. No replacements.