Aaditya Joshi
Aaditya Joshi

Reputation: 142

How to fetch number of reads and writes of Cloud Firestore

Is there a way (maybe through an API or something) that can be used to fetch the number of reads (0/50,000) and writes (0/20,000) of the Cloud Firestore database so that there won't be a need to log in the firebase console separately and the user will keep track from within the app itself? enter image description here

Upvotes: 1

Views: 1138

Answers (2)

sllopis
sllopis

Reputation: 2368

There is no straighforward way to obtain the number of reads and writes from a Cloud Firestore database via the Google Cloud Console or Firebase Console dashboards, as per the documentation.

However, you can leverage Cloud Monitoring to create custom Cloud Firestore metrics of usage. Monitoring provides the Cloud Monitoring API v3 which can help you retrieve the number of reads and writes in your database. Check out the list of Firestore metrics.

Other stackoverflow questions that can help you with the process include:

Upvotes: 1

Doug Stevenson
Doug Stevenson

Reputation: 317477

There is currently no public documented API for getting Firestore usage statistics from a Firebase project. Feel free to send your idea as a feature request to Firebase support.

Upvotes: 0

Related Questions