Skip to content

Remove redundant OTLP XHR-retry trace exporter wrapper - #2599

Open
hahn-kev-bot wants to merge 1 commit into
developfrom
claude/laughing-lewin-d1ff8e
Open

Remove redundant OTLP XHR-retry trace exporter wrapper#2599
hahn-kev-bot wants to merge 1 commit into
developfrom
claude/laughing-lewin-d1ff8e

Conversation

@hahn-kev-bot

Copy link
Copy Markdown
Collaborator

🤖 AI summary

Follow-up cleanup to #2598. The OTel dep bump in #2544 took @opentelemetry/otlp-exporter-base from 0.208 to 0.217+ (this branch resolves 0.221), which deleted the browser sendBeacon and XHR transports — all browser OTLP exports now go through fetch. createOtlpSendBeaconExportDelegate is now just a deprecated alias for createOtlpFetchExportDelegate.

OTLPTraceExporterBrowserWithXhrRetry existed only for the old behavior: on a sendBeacon failure it retried the export with a second exporter built with a truthy headers config to force the XHR transport, keyed off an error message containing "beacon". After the upgrade both the primary and retry exporters resolve to the fetch transport, and fetch never emits the "beacon"-worded error the retry branch checks for — so the retry path is unreachable and the wrapper adds nothing.

Changes:

  • Replace OTLPTraceExporterBrowserWithXhrRetry with a plain browser OTLPTraceExporter in otel.client.ts.
  • Delete trace-exporter-browser-with-xhr-retry.ts (no other references).
  • Refresh the stale maxExportBatchSize comment that referenced the old sendBeacon size limit / XHR fallback.

Verified against the installed/locked package versions (0.217 in the store, 0.221 in the lockfile) that the beacon delegate is a fetch alias and no XHR/beacon transport remains. The #2598 loop fix (ignoreUrls: [TRACE_EXPORT_URL_PATTERN] on the fetch/XHR instrumentations) is untouched and orthogonal to this cleanup.

Test plan

  • pnpm -C frontend run build
  • pnpm -C frontend run lint

The OTel dep bump (#2544) took @opentelemetry/otlp-exporter-base from
0.208 to 0.217+, which deleted the browser sendBeacon and XHR transports
and now routes all browser OTLP exports through fetch.
OTLPTraceExporterBrowserWithXhrRetry existed only to retry a failed
sendBeacon export over XHR (forced via a truthy `headers` config, keyed
off a "beacon"-worded error). Both the primary and retry exporters now
resolve to the fetch transport, and fetch never emits the "beacon" error
the retry branch checks for, so the retry path is unreachable.

Replace it with a plain browser OTLPTraceExporter and delete the wrapper.
Also refresh the stale maxExportBatchSize comment that referenced the old
sendBeacon size limit / XHR fallback.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 81b390de-c0d3-4b32-9711-221e5b1c0b26


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added the 📦 Lexbox issues related to any server side code, fw-headless included label Aug 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

📦 Lexbox issues related to any server side code, fw-headless included

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants