Martin Rajniak
Martin Rajniak

Reputation: 640

How to query the same crash count from BigQuery as Firebase crash reporting dashboard shows

I have tried to write a query to get number of crashes from BigQuery for certain day. But the number that I got from query doesn't match the number that I can see on Firebase crash reporting dashboard.

So what I am doing wrong?

Here is the query:

SELECT
  event_dim.date AS CrashDate,
  -- doesn't matter what event_dim field we choose
  COUNT(event_dim.name) AS CrashCount,
FROM
  TABLE_DATE_RANGE(com_sample_ANDROID.app_events_, TIMESTAMP('2017-01-27'), TIMESTAMP('2017-01-27'))
WHERE
  event_dim.name = 'app_exception'
  AND event_dim.params.key = 'fatal'
  AND event_dim.params.value.int_value = 1
GROUP BY
  CrashDate

Upvotes: 0

Views: 1389

Answers (1)

Doug Stevenson
Doug Stevenson

Reputation: 317497

There are a couple of things to know about what you're trying to do.

First, there is throttling in the Crash SDK that will prevent grossly repeated requests from being sent to the server. This defends us against sloppy programming in the app that could spam us. Analytics may have a different reckoning about what happened, because it's different code.

Second, for apps that legitimately send a lot of data, we may perform a sampling of the data, which means we lose some accuracy but gain a lot of speed. At that scale, you shouldn't expect your numbers to be exact (and it shouldn't matter, because the numbers will be big).

Upvotes: 2

Related Questions