From 2705871e488f2343557d1a4aafb08e9e03803765 Mon Sep 17 00:00:00 2001 From: Nicolas Hrubec Date: Sat, 8 Aug 2026 11:24:09 +0200 Subject: [PATCH] ref(core)!: Remove deprecated `addAutoIpAddressToUser` export Remove the internal, deprecated `addAutoIpAddressToUser` API. It is dead code with no call sites; IP inferral is set via SDK metadata options on the client instead. Co-Authored-By: Claude Opus 4.8 (1M context) --- packages/core/src/shared-exports.ts | 2 -- packages/core/src/utils/ipAddress.ts | 14 -------------- 2 files changed, 16 deletions(-) diff --git a/packages/core/src/shared-exports.ts b/packages/core/src/shared-exports.ts index aafa81a9124a..acbd859d3087 100644 --- a/packages/core/src/shared-exports.ts +++ b/packages/core/src/shared-exports.ts @@ -98,8 +98,6 @@ export { parameterize, fmt } from './utils/parameterize'; export type { HandleTunnelRequestOptions } from './utils/tunnel'; export { handleTunnelRequest } from './utils/tunnel'; export { addAutoIpAddressToSession } from './utils/ipAddress'; -// eslint-disable-next-line typescript/no-deprecated -export { addAutoIpAddressToUser } from './utils/ipAddress'; export { convertSpanLinksForEnvelope, spanToTraceHeader, diff --git a/packages/core/src/utils/ipAddress.ts b/packages/core/src/utils/ipAddress.ts index 3e8f18e71472..2e89b755e9b7 100644 --- a/packages/core/src/utils/ipAddress.ts +++ b/packages/core/src/utils/ipAddress.ts @@ -1,23 +1,9 @@ import type { Session, SessionAggregates } from '../types/session'; -import type { User } from '../types/user'; // By default, we want to infer the IP address, unless this is explicitly set to `null` // We do this after all other processing is done // If `ip_address` is explicitly set to `null` or a value, we leave it as is -/** - * @internal - * @deprecated -- set ip inferral via via SDK metadata options on client instead. - */ -export function addAutoIpAddressToUser(objWithMaybeUser: { user?: User | null }): void { - if (objWithMaybeUser.user?.ip_address === undefined) { - objWithMaybeUser.user = { - ...objWithMaybeUser.user, - ip_address: '{{auto}}', - }; - } -} - /** * @internal */