Skip to content

Commit d681cd0

Browse files
logaretmclaude
andcommitted
fix: Log enableElementTiming deprecation warning unconditionally
Use consoleSandbox instead of DEBUG_BUILD guard so the warning shows in production bundles too. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 043a377 commit d681cd0

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

packages/browser/src/tracing/browserTracingIntegration.ts

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import type {
1111
import {
1212
addNonEnumerableProperty,
1313
browserPerformanceTimeOrigin,
14+
consoleSandbox,
1415
dateTimestampInSeconds,
1516
debug,
1617
generateSpanId,
@@ -354,10 +355,13 @@ const DEFAULT_BROWSER_TRACING_OPTIONS: BrowserTracingOptions = {
354355
* We explicitly export the proper type here, as this has to be extended in some cases.
355356
*/
356357
export const browserTracingIntegration = ((options: Partial<BrowserTracingOptions> = {}) => {
357-
if (DEBUG_BUILD && 'enableElementTiming' in options) {
358-
debug.warn(
359-
'[Tracing] `enableElementTiming` is deprecated and no longer has any effect. Use the standalone `elementTimingIntegration` instead.',
360-
);
358+
if ('enableElementTiming' in options) {
359+
consoleSandbox(() => {
360+
// oxlint-disable-next-line no-console
361+
console.warn(
362+
'[Sentry] `enableElementTiming` is deprecated and no longer has any effect. Use the standalone `elementTimingIntegration` instead.',
363+
);
364+
});
361365
}
362366

363367
const latestRoute: RouteInfo = {

0 commit comments

Comments
 (0)