0

Is there currently any way to see where Firestore reads are coming from?

I have several apps and many background + several scheduled cloud functions and it is going to be a big task to try and tune these to reduce reads if I don't know where the reads are coming from.

Even if I could split reads between the front end and the admin SDK that would help narrow things down.

All the SQL databases I have worked with have some kind of profiler to see which queries are being run and how long they take. I wouldn't mind increasing my Firestore usage while I am running the analysis as it would save me usage in the long run.

I am using Angular with AngularFire on the frontend.

EDIT:

One idea I had was to use google analytics to track the reads by using events for each query. I will update this question once I have tried it.

MadMac
  • 4,048
  • 6
  • 32
  • 69

2 Answers2

2

Is there currently any way to see where Firestore reads are coming from?

No, you can only currently get a summary of all reads and writes in the console. It does not break down by origin or cause. That is something you'll have to record for yourself somehow.

Bear in mind that the Firebase console itself costs reads to operate. See also: Firestore - unexpected reads

Doug Stevenson
  • 297,357
  • 32
  • 422
  • 441
  • Thanks @Doug I kind of expected that to be the case. Is there anything in the plan for Firestore to fill this gap? – MadMac Sep 21 '20 at 21:27
  • 1
    I don't know. You can always file a feature request with Firebase support. https://support.google.com/firebase/contact/support – Doug Stevenson Sep 21 '20 at 22:13
0

I've recently been in the similar situation with Firestore. For me network intelligence solved the problem to find out who is a heavy reader.

enter image description here