tramlinehq / tramline

Release coordination and deployment platform, just for your mobile apps
https://tramline.app
Apache License 2.0
237 stars 11 forks source link

Crashlytics integration akin to Bugsnag #645

Open kitallis opened 2 months ago

kitallis commented 2 months ago

Context

This is the current set of health metics data stored by Tramline:

# Table name: release_health_metrics
#  daily_users                :bigint
#  daily_users_with_errors    :bigint
#  errors_count               :bigint
#  new_errors_count           :bigint
#  sessions                   :bigint
#  sessions_in_last_day       :bigint
#  sessions_with_errors       :bigint
#  total_sessions_in_last_day :bigint

We will need to transform the data from Crashlytics into a similar form and store it in Tramline.

Figure out the query required to get this data. Make sure to filter by the correct version code and version name.

Fetch frequency can be lower than Bugsnag (every 30 minutes?).

Once the data is fetched and stored, the rest of the health rule application logic remains the same. So, all that is needed from this issue to fetch, transform and store the release health metrics data.

Crashlytics is special because there's no direct API to get this data. We expect Firebase to be connected to the user's account, and we would make calls to the BQ dataset instead. Link to sample BQ data exported to a spreadsheet.

Requirements

Acceptance Criteria

Additional Notes

Here's a sample BQ query that can be used as a starting point for all the other queries to be written:

SELECT
  COUNT(DISTINCT event_id) AS number_of_crashes,
  FORMAT_TIMESTAMP("%F", event_timestamp) AS date_of_crashes
FROM
 `decoded-theme-355014.firebase_crashlytics.com_tramline_ueno_ANDROID_REALTIME`
GROUP BY
  date_of_crashes
ORDER BY
  date_of_crashes DESC
LIMIT 30;
gitstart-connector[bot] commented 1 month ago

Issue synced into GitStart. Please review, edit and hand it off to GitStart by following this link.

gitstart-connector[bot] commented 3 weeks ago

This issue has been handed off to GitStart: https://clients.gitstart.com/tramline/11653/tickets/TRAB-645

kitallis commented 2 weeks ago

Some additional definitions, referenced from https://bugsnagapiv2.docs.apiary.io/#reference/projects/releases/view-a-release