tramlinehq / tramline

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

Crashlytics integration akin to Bugsnag #645

Open kitallis opened 1 month ago

kitallis commented 1 month 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 not direct API to get this data. We expect a 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 week ago

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