Is there any way to profile firestore database?

一世执手 提交于 2020-01-19 16:15:49

问题


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)?


回答1:


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

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



来源:https://stackoverflow.com/questions/50133512/is-there-any-way-to-profile-firestore-database

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!