How to export data from Firebase Crashlytics to another application?

时光总嘲笑我的痴心妄想 提交于 2021-02-16 20:19:01

问题


I am interested in fetching the Crash-free users statistics and the user affected by Crashes trend from the Google firebase Crashlytics.

Is there any API using which I can call using my application to export the data from Firebase Crashlytics?

I looked at a few other similar questions like theses:

  • How long does Firebase store my crash data? / Export data from Crashlytics?
  • Export data from Firebase Crashlytics console?
  • How to export crash-free users from firebase?

, but none of them actually mention a solution to export data out of Crashlytics.

As suggested in one of the questions above, I could export the data into Big Query and then calculate the crash-free statistic myself, but I haven't used Big Query before and I'm not sure if I will be able to export that data from Big Query either?

Is it possible to get that data out of Crashlytics somehow?

UPDATE

Upon looking a bit more closely at the networking console in Google Chrome, while loading the Crashlytics data for my App, I can see that Crashlytics makes a POST call to the following endpoint (along with its auth/cookies):

https://***.google.com/v1/projects/***/clients/ios:abc.def.MyApp:getDailyRealtimeCrashUsersReport?alt=json&key=xyz

and the response to this contains the exact data that I am looking for:

{
  "report": {
    "dailyUsers": [
      {
        "dateMs": "xxxx",
        "totalUsers": 1234,
        "crashUsers": 12
      }
      ...
      ...
    ],
    "totalUsers": 12345,
    "totalCrashUsers": 123
  }
}


Is there a way I could directly call this API along with a proper auth (OAuth2 maybe?) through my (Java) code, and skip having to go to BigQuery and do all those extra steps? It would be easier to make a direct call to this endpoint and get the data directly instead of first exporting it to BigQuery and the running a custom query (/queries?) there and the exporting the data through another API.

And,

If such a solution is not possible, then is there a way to get a similar kind of data from BigQuery and export similarly in JSON it via a BigQuery API call?

from the BigQuery API link given in the answer below, I can see some APIs which support exporting models/projects/jobs/datasets/tables etc.. but couldn't figure out if there is a way to export data based on a custom queries that I would need to run to get the data I want?


回答1:


It seems that Crashlytics doesn't support this kind of API you're searching for.

About exporting from Crashlytics to BigQuery, I've found the following information here

Enabling BigQuery export

  1. Go to the Integrations page in the Firebase console.
  2. In the BigQuery card, click Link.
  3. Follow the on-screen instructions to enable BigQuery.

When you link your project to BiqQuery:

  • Firebase exports a copy of your existing data to BigQuery.
  • Firebase sets up daily syncs of your data from your Firebase project to BigQuery.
  • By default, all apps in your project are linked to BigQuery and any apps that you later add to the project are automatically linked to BigQuery.

What data is exported to BigQuery?

Firebase Crashlytics data is exported into a BigQuery dataset named firebase_crashlytics. By default, individual tables will be created inside the Crashlytics data set for each app in your project. Firebase names the tables based on the app's bundle identifier, with periods converted to underscores, and a platform name appended to the end. For example, data for an app with the ID com.google.test would be in a table named com_google_test_ANDROID.

To export data from BigQuery, you can use the BigQuery API or use the BigQuery SDK for some programming language.

Does it help you? If it doesn't, please provide me more information so I can provide you a better answer.



来源:https://stackoverflow.com/questions/59674350/how-to-export-data-from-firebase-crashlytics-to-another-application

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