Automattic / Automattic-Tracks-Android

Client library for tracking user events for later analysis
GNU General Public License v2.0
30 stars 13 forks source link

feat: allow to specify profiling sampling #178

Closed wzieba closed 1 year ago

wzieba commented 1 year ago

Description

This PR adds profilesSampleRate to Sentry Performance configuration, which allows enabling the Sentry Profiling feature.

The default value is 0.0, which disables this feature for backwards compatibility.

How to test

  1. Add property with the name sentryTestProjectDSN to gradle.properties with the value of the DSN of tracks-demo-android project (you can find it in the Sentry dashboard).
  2. Run the test app
  3. Press "Measure performance of sample..."
  4. Go to the Profiles tab in Sentry (make sure you've selected tracks-demo-android project)
  5. Make sure that after a few seconds, the new profile has been uploaded
atorresveiga commented 1 year ago

Thanks for working on this @wzieba! Everything is working as expected and the code looks nice 🙌

Evidence

ARHyCL.png

LGTM! :shipit:

wzieba commented 1 year ago

Thanks @atorresveiga ! Let's leave this PR unmerged for now (sorry for late notice) as I do some more experiments

wzieba commented 1 year ago

All works good 👍