Skip to content

Conversation

@gingerbenw
Copy link
Member

Goal

Implement shared tracker in the network-breadcrumbs plugin

Testing

Covered by existing tests

@github-actions
Copy link

github-actions bot commented Dec 18, 2025

@bugsnag/browser bundle size diff

Minified Minfied + Gzipped
Before 47.74 kB 14.17 kB
After 49.46 kB 14.64 kB
± ⚠️ +1,715 bytes ⚠️ +475 bytes

code coverage diff

<temporarily disabled>

Generated by 🚫 dangerJS against 7b54288

@gingerbenw gingerbenw requested a review from Copilot December 19, 2025 08:41
Copy link
Contributor

Copilot AI left a 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-tracker package
  • 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.

@gingerbenw gingerbenw marked this pull request as ready for review December 19, 2025 10:40
Copy link
Contributor

@yousif-bugsnag yousif-bugsnag left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

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.

3 participants