Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there any way to profile firestore database?

I am getting very high counts of Entity Writes in my firestore database.

Write permission in most of the paths are restricted, done from back-end server using admin SDK. Only a very few paths have write access- specifically only to the users who are (authenticated & registered & joined and approved in a specific group), so even though the ways to abuse are apparently thin, yet hard to specifically identify.

Only way I see- is to execute Cloud Functions on every write, and have the function log the paths somewhere to analyze. But that introduces further costs and complexity.

Is there any way/recommendation to monitor/profile where (i.e.- path) and who (UID or any identity) are performing the writes? There are tools to do such for RTDB, bu't can't find anything for Firestore.

I am also wondering if there is any way to restrict ip/users automatically in case of abuse (i.e.- high rate of read/write)?

like image 285
AsifM Avatar asked May 02 '18 11:05

AsifM


1 Answers

What I'm currently doing is going to firestore console => menu usage => view usage and I see something like this:

enter image description here

It's not the same as the profiler, but better than nothing.

I'm also keeping an eye on the video on the link below to see if someone provides an answer. People are asking for the profiler too. https://www.youtube.com/watch?v=9CObBsjk6Tc

like image 78
Artur Carvalho Avatar answered Nov 10 '22 17:11

Artur Carvalho