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

[PLAT-11287] Create NavigationContextProvider #382

Closed gingerbenw closed 7 months ago

gingerbenw commented 7 months ago

Goal

Add a navigation context provider to start and end spans

Also includes initial setup for the react navigation plugin, but this will not perform any function until a later PR

Design

By using react context we can ensure a single navigation can be tracked across an application and controlled by multiple components

Testing

Added unit tests for context provider

github-actions[bot] commented 7 months ago

Browser bundle size

NPM build

Package
Before 177.95 kB
After 177.95 kB
± No change

CDN build

Unminified Minfied Minified + gzipped
Before 85.60 kB 32.28 kB 9.89 kB
After 85.60 kB 32.28 kB 9.89 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/id-generator.ts 90%
(-10%)
100%
(+0%)
100%
(+0%)
90%
(-10%)
🔴 ✨ /home/runner/work/bugsnag-js-performance/bugsnag-js-performance/packages/react-navigation/lib/index.ts 0%
(+0%)
100%
(+100%)
0%
(+0%)
0%
(+0%)
🔴 ✨ /home/runner/work/bugsnag-js-performance/bugsnag-js-performance/packages/react-navigation/lib/react-navigation-native-plugin.ts 0%
(+0%)
100%
(+100%)
0%
(+0%)
0%
(+0%)

Total:

Lines Branches Functions Statements
91.93%(-0.38%) 80.56%(+0%) 92.83%(-0.48%) 90.01%(-0.4%)

Generated against acbbff843f4a7c7b2b91e84a32c1af1b23d45723 on 12 December 2023 at 16:49:12 UTC