Skip to content

WIP!!! feat(browser-instrumentation): add XHR instrumentation - #367

Draft
david-luna wants to merge 64 commits into
open-telemetry:mainfrom
david-luna:instr-xhr
Draft

WIP!!! feat(browser-instrumentation): add XHR instrumentation#367
david-luna wants to merge 64 commits into
open-telemetry:mainfrom
david-luna:instr-xhr

Conversation

@david-luna

@david-luna david-luna commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Which problem is this PR solving?

Closes #258

Short description of the changes

Inclusion of the XmlHttpRequest instrumentation with some differences from the original version in https://github.com/open-telemetry/opentelemetry-js/tree/main/experimental/packages/opentelemetry-instrumentation-fetch

  • utils moved to this package instead of using @opentelemetry/sdk-trace-web
  • removed dependency from @opentelemetry/core
  • only emit span for the XHR call. it does not emit child spans for preflight requests neither span event for the resource timings

this instrumentation follows the previous work on fetch instrumentation (PR) by relying on the resource-timing instrumentation to correlate logs.

Type of change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • Unit tests for new utils
  • Browser tests for instrumentation

Checklist:

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

@david-luna david-luna changed the title feat(browser-instrumentation): add XHR instrumentation WIP!!! feat(browser-instrumentation): add XHR instrumentation Jul 28, 2026
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.

Move XHR instrumentation from JS core to this repo

1 participant