Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Analytics: Allow QAs to reliably verify analytics events sent during PR testing #21680

Open
ilmotta opened this issue Nov 26, 2024 · 1 comment

Comments

@ilmotta
Copy link
Contributor

ilmotta commented Nov 26, 2024

Problem

While testing PRs, a QA may need to precisely know which analytics events were sent during their testing so that they can spot bugs or missed events. As of today this is hard or can be quite cumbersome because events are mixed with other events sent from devs during development or from other QAs testing PRs.

Implementation

The solution is to modify the centralized metrics implementation in status-go to allow the client to override the value referred to as UserID (a random UUID generated once per Status installation). For PR builds, using the environment variable COMMIT_HASH as the user ID provides a reliable and convenient way to filter analytics events by the commit hash, which is readily accessible in GitHub or CI jobs.

There's another benefit from solving this issue, which is that we want to eventually be able to track certain events using random user IDs. There are certain events where we don't care about the concept of a user or Status installation. For example, to the answer the question Which dApps are most used?.

Acceptance Criteria

  • QA can pinpoint all events generated from any testing session.
  • Outside CI environments, we should allow the developer to easily override the user ID as this can be useful during development. This can be achieved via a simple environment variable using the shadow-cljs machinery, just like we do with many other env vars.
  • status-go should be changed to allow any custom UserID or fallback to the global value per installation. status-go should be agnostic of the value of the UserID, i.e. if the client sends banana, status-go should use that as the UserID.
@ilmotta
Copy link
Contributor Author

ilmotta commented Nov 26, 2024

cc @Samyoul @churik

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

No branches or pull requests

1 participant