bugsnag / bugsnag-js-performance

Monitor the performance of your JavaScript (web and React Native) and see the results in your BugSnag dashboard.
https://docs.bugsnag.com/performance/integration-guides
MIT License
4 stars 1 forks source link

Add `tracePropagationUrls` config option for React Native #444

Closed yousif-bugsnag closed 2 months ago

yousif-bugsnag commented 2 months ago

Goal

Replaces the propagateTraceContext boolean in the network request callback with a new config option tracePropagationUrls (an array of RegExp's or strings) to control which requests get propagation headers (in React Native only).

Design

tracePropagationUrls is an array of RegExp's or strings (similar to settleIgnoreUrls in the browser package)

propagateTraceContext has been removed from the base NetworkRequestInfo interface in the request-tracker package and added to BrowserNetworkRequestInfo instead.

Testing

Updated the unit and e2e tests

github-actions[bot] commented 2 months ago

Browser bundle size

NPM build

Package
Before 184.46 kB
After 184.67 kB
± +202 bytes ⚠️

CDN build

Unminified Minfied Minified + gzipped
Before 92.90 kB 34.91 kB 10.52 kB
After 92.90 kB 34.91 kB 10.52 kB
± No change No change No change

Code coverage

Ok File (✨=New File) Lines Branches Functions Statements
🔴 /home/runner/work/bugsnag-js-performance/bugsnag-js-performance/packages/platforms/react-native/lib/auto-instrumentation/network-request-plugin.ts 81.63%
(+1.2%)
72.72%
(+6.06%)
100%
(+0%)
83.63%
(+1.28%)

Total:

Lines Branches Functions Statements
87.45%(+0.02%) 78.63%(+0.06%) 88.27%(+0.08%) 84.19%(+0.03%)

Generated against f3e734b94fcfeaf91b5b5fbd149969a34b4cd302 on 24 April 2024 at 16:12:25 UTC