-
Notifications
You must be signed in to change notification settings - Fork 256
Use shared tracker in network breadcrumbs package #2645
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: integration/http-errors
Are you sure you want to change the base?
Use shared tracker in network breadcrumbs package #2645
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR refactors the network-breadcrumbs plugin to use a shared request tracker implementation instead of maintaining its own monkey-patching logic. The change promotes code reuse and centralizes request tracking functionality.
Key Changes:
- Replaces inline XMLHttpRequest and fetch monkey-patching with the shared
@bugsnag/request-trackerpackage - Adds auto-loading capability for the request tracker plugin if not already present
- Simplifies the network-breadcrumbs plugin implementation by delegating request tracking to the shared tracker
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| scripts/generate-react-native-fixture.js | Adds @bugsnag/request-tracker to internal dependencies for React Native fixture generation |
| packages/request-tracker/package.json | Includes lib/ directory in published package files |
| packages/plugin-network-breadcrumbs/package.json | Adds @bugsnag/request-tracker as a runtime dependency |
| packages/plugin-network-breadcrumbs/network-breadcrumbs.js | Replaces custom monkey-patching logic with shared tracker integration, including auto-loading and fallback handling |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
yousif-bugsnag
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Goal
Implement shared tracker in the network-breadcrumbs plugin
Testing
Covered by existing tests