Skip to content

Conversation

@YangJonghun
Copy link
Contributor

@YangJonghun YangJonghun commented Dec 14, 2025

Which problem is this PR solving?

Adds support for fetchLater API as the preferred transport method for browser-based OTLP exporters. fetchLater provides reliability guarantees that the request will be sent even if the page is closed, making it ideal for telemetry data export.

Short description of the changes

  • Add FetchLaterTransport class in src/transport/fetch-later-transport.ts
  • Add createOtlpFetchLaterExportDelegate in src/otlp-browser-http-export-delegate.ts
  • Update inferExportDelegateToUse to prioritize fetchLater over other transports when available
  • Add unit tests for the new transport and delegate selection logic

Type of change

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

  • npm run test:browser - All tests pass
  • Added tests for FetchLaterTransport covering success, failure, QuotaExceededError, AbortSignal, and timeout scenarios
  • Added tests for inferExportDelegateToUse to verify fetchLater is selected when available

Checklist:

  • Followed the style guidelines of this project
  • Unit tests have been added
  • Documentation has been updated

@YangJonghun YangJonghun requested a review from a team as a code owner December 14, 2025 10:05
@codecov
Copy link

codecov bot commented Dec 14, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.43%. Comparing base (a36e8e9) to head (9ad31d0).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6217   +/-   ##
=======================================
  Coverage   95.43%   95.43%           
=======================================
  Files         317      317           
  Lines        9521     9521           
  Branches     2197     2197           
=======================================
  Hits         9086     9086           
  Misses        435      435           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant