diff --git a/packages/core/src/tracing/dynamicSamplingContext.ts b/packages/core/src/tracing/dynamicSamplingContext.ts index f27052c8cfbc..a51c2362c437 100644 --- a/packages/core/src/tracing/dynamicSamplingContext.ts +++ b/packages/core/src/tracing/dynamicSamplingContext.ts @@ -19,6 +19,8 @@ export function getDynamicSamplingContextFromClient( const options = client.getOptions(); const { publicKey: public_key } = client.getDsn() || {}; + // TODO(v8): Remove segment from User + // eslint-disable-next-line deprecation/deprecation const { segment: user_segment } = (scope && scope.getUser()) || {}; const dsc = dropUndefinedKeys({ diff --git a/packages/types/src/envelope.ts b/packages/types/src/envelope.ts index c07853c377d9..a33f823ab8f5 100644 --- a/packages/types/src/envelope.ts +++ b/packages/types/src/envelope.ts @@ -20,6 +20,9 @@ export type DynamicSamplingContext = { release?: string; environment?: string; transaction?: string; + /** + * @deprecated Functonality for segment has been removed. + */ user_segment?: string; replay_id?: string; sampled?: string; diff --git a/packages/types/src/user.ts b/packages/types/src/user.ts index 9c48c7f4967f..c9eeac18ce51 100644 --- a/packages/types/src/user.ts +++ b/packages/types/src/user.ts @@ -1,10 +1,15 @@ -/** JSDoc */ +/** + * An interface describing a user of an application or a handled request. + */ export interface User { [key: string]: any; id?: string | number; ip_address?: string; email?: string; username?: string; + /** + * @deprecated Functonality for segment has been removed. Use a custom tag or context instead to capture this information. + */ segment?: string; }