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-11285] Add Navigation span attributes #393

Closed gingerbenw closed 5 months ago

gingerbenw commented 5 months ago

Goal

To add required attributes for navigation spans

Design

As the public startNavigationSpan method returns a span without any way to add attributes, this PR refactors the react navigation plugin to accept the span factory as part of it's configuration method, using all internal functionality to start and end spans, and add new attributes.

Testing

Update existing unit tests to add assertions for new span attributes

github-actions[bot] commented 5 months ago

Browser bundle size

NPM build

Package
Before 178.19 kB
After 178.36 kB
± +176 bytes ⚠️

CDN build

Unminified Minfied Minified + gzipped
Before 85.73 kB 32.30 kB 9.90 kB
After 85.74 kB 32.30 kB 9.90 kB
± +13 bytes ⚠️ +2 bytes ⚠️ +2 bytes ⚠️

Code coverage

Ok File (✨=New File) Lines Branches Functions Statements
🔴 /home/runner/work/bugsnag-js-performance/bugsnag-js-performance/packages/react-navigation/lib/react-navigation-native-plugin.ts 0%
(+0%)
0%
(-100%)
0%
(+0%)
0%
(+0%)

Total:

Lines Branches Functions Statements
91.52%(+0.37%) 80.11%(-0.3%) 91.89%(+0.23%) 89%(+0.43%)

Generated against 33cbceb6384a1158a2b99f7f8025caf218f1cfbf on 17 January 2024 at 16:30:07 UTC