Skip to content

Commit 80669b9

Browse files
logaretmclaude
andcommitted
fix(browser): Prevent duplicate INP spans when span streaming is enabled
Gate standalone INP (`startTrackingINP`) behind `!spanStreamingEnabled` and gate streamed INP (`trackInpAsSpan`) behind `enableInp` so both paths respect the user's preference and don't produce duplicate data. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent f0325bd commit 80669b9

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

packages/browser/src/tracing/browserTracingIntegration.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -524,10 +524,12 @@ export const browserTracingIntegration = ((options: Partial<BrowserTracingOption
524524
if (spanStreamingEnabled) {
525525
trackLcpAsSpan(client);
526526
trackClsAsSpan(client);
527-
trackInpAsSpan(client);
527+
if (enableInp) {
528+
trackInpAsSpan(client);
529+
}
528530
}
529531

530-
if (enableInp) {
532+
if (enableInp && !spanStreamingEnabled) {
531533
startTrackingINP();
532534
}
533535

0 commit comments

Comments
 (0)