FirebaseExtended / reactfire

Hooks, Context Providers, and Components that make it easy to interact with Firebase.
https://firebaseopensource.com/projects/firebaseextended/reactfire/
MIT License
3.52k stars 401 forks source link

Add more Performance Monitoring features #420

Open jhuleatt opened 3 years ago

jhuleatt commented 3 years ago

The next version of RxFire has performance monitoring features built-in. Investigate what functionality we can add to ReactFire

zijianjoy commented 3 years ago

Custom traces

There are two ways of logging custom trace, https://firebase.google.com/docs/perf-mon/custom-code-traces?platform=web and https://firebase.google.com/docs/perf-mon/custom-code-traces?platform=web#user-timing-api.

The benefit of custom code trace is you can add custom attributes: https://firebase.google.com/docs/perf-mon/custom-code-traces?platform=web#create-custom-attributes. It will be great for ability to support both custom trace approach, and the ability to log custom trace by starting from one react component, and stop at another react component.

Network requests

Network request capturing is done automatically on web SDK https://firebase.google.com/docs/perf-mon/network-traces?platform=web. So reactfire doesn't need to do much here. But just curious if there is a way for user to control enabling/disabling network request metrics collection? As well as other collection switch.

React-based performance (Open-ended question)

Is there any common React based performance metrics developer would be interested in? Maybe Reactfire can wrap them in the offering, so it can become part of out-of-box metric collection for React developers?

Out-of-box concept: https://firebase.google.com/docs/perf-mon/page-load-traces