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
5 stars 3 forks source link

[PLAT-11232] Error correlation React Native #490

Closed gingerbenw closed 3 months ago

gingerbenw commented 3 months ago

Goal

Implement error correlation end to end tests in React Native

Design

Install react-native in fixture generation files, and implement native startup code to initialise Bugsnag from a scenario

Changeset

Testing

Add end to end test to ensure current span and trace id is included in error reports

github-actions[bot] commented 3 months ago

Browser bundle size

NPM build

Package
Before 193.47 kB
After 194.05 kB
± +574 bytes ⚠️

CDN build

Unminified Minfied Minified + gzipped
Before 96.91 kB 36.36 kB 10.97 kB
After 97.09 kB 36.09 kB 10.91 kB
± +183 bytes ⚠️ -272 bytes 🎉 -60 bytes 🎉

Code coverage

Ok File (✨=New File) Lines Branches Functions Statements
🔴 /home/runner/work/bugsnag-js-performance/bugsnag-js-performance/packages/platforms/react-native/lib/backgrounding-listener.ts 100%
(+0%)
87.5%
(+1.79%)
100%
(+0%)
100%
(+0%)
🔴 /home/runner/work/bugsnag-js-performance/bugsnag-js-performance/packages/platforms/react-native/lib/get-network-connection-type.ts 50%
(+7.15%)
20%
(+0%)
100%
(+0%)
50%
(+7.15%)
🔴 /home/runner/work/bugsnag-js-performance/bugsnag-js-performance/packages/platforms/react-native/lib/id-generator.ts 100%
(+0%)
100%
(+0%)
88.88%
(+0%)
97.5%
(+0.28%)
🔴 /home/runner/work/bugsnag-js-performance/bugsnag-js-performance/packages/platforms/react-native/lib/resource-attributes-source.ts 94.73%
(+2.14%)
95%
(-5%)
100%
(+0%)
94.73%
(+2.14%)
🔴 /home/runner/work/bugsnag-js-performance/bugsnag-js-performance/packages/platforms/react-native/lib/span-attributes-source.ts 100%
(+0%)
85.71%
(+2.38%)
100%
(+0%)
100%
(+0%)
🔴 /home/runner/work/bugsnag-js-performance/bugsnag-js-performance/packages/platforms/react-native/lib/auto-instrumentation/network-request-plugin.ts 80.39%
(+0.39%)
57.89%
(-14.83%)
100%
(+0%)
82.45%
(+0.1%)
/home/runner/work/bugsnag-js-performance/bugsnag-js-performance/packages/platforms/react-native/lib/persistence/file-based.ts 95.74%
(+0.87%)
93.33%
(+2.43%)
100%
(+0%)
96.15%
(+0.7%)
🔴 /home/runner/work/bugsnag-js-performance/bugsnag-js-performance/packages/platforms/react-native/lib/persistence/file-utils.ts 60%
(+0%)
26.31%
(-2.26%)
83.33%
(+0%)
60%
(+0%)
🔴 /home/runner/work/bugsnag-js-performance/bugsnag-js-performance/packages/platforms/react-native/lib/persistence/index.ts 92.85%
(+0.55%)
40%
(-10%)
100%
(+0%)
93.33%
(+0.48%)
🔴 /home/runner/work/bugsnag-js-performance/bugsnag-js-performance/packages/platforms/react-native/lib/retry-queue/directory.ts 93.87%
(-0.72%)
75%
(+75%)
100%
(+0%)
94.54%
(-0.8%)
/home/runner/work/bugsnag-js-performance/bugsnag-js-performance/packages/platforms/react-native/lib/retry-queue/file-based.ts 98.27%
(+0.55%)
100%
(+0%)
100%
(+0%)
98.46%
(+0.51%)
🔴 /home/runner/work/bugsnag-js-performance/bugsnag-js-performance/packages/request-tracker/lib/request-tracker-fetch.ts 83.01%
(+9.43%)
62.74%
(+7.84%)
80%
(+25%)
78.87%
(+18.31%)
🔴 /home/runner/work/bugsnag-js-performance/bugsnag-js-performance/packages/request-tracker/lib/request-tracker-xhr.ts 94.87%
(+20.52%)
72.72%
(+18.18%)
100%
(+20%)
93.22%
(+35.6%)
🔴 /home/runner/work/bugsnag-js-performance/bugsnag-js-performance/packages/request-tracker/lib/url-helpers.ts 100%
(+18.19%)
72.72%
(+18.18%)
100%
(+50%)
94.44%
(+33.33%)

Total:

Lines Branches Functions Statements
87.82%(+1.08%) 78.64%(+1.46%) 89.33%(+1.49%) 85.86%(+2.32%)

Generated against ebc2b23a16de1b754f5d31890f8041dbf803e55b on 21 August 2024 at 15:52:20 UTC

gingerbenw commented 3 months ago

@yousif-bugsnag one additional change - I've now combined the generate react native and react native navigation scripts