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

Future-proof metrics infrastructure #4389

Closed
BenHenning opened this issue Jun 9, 2022 · 2 comments · Fixed by #4421
Closed

Future-proof metrics infrastructure #4389

BenHenning opened this issue Jun 9, 2022 · 2 comments · Fixed by #4421
Assignees
Labels
Impact: Medium Moderate perceived user impact (non-blocking bugs and general improvements). Z-ibt Temporary label for Ben to keep track of issues he's triaged.

Comments

@BenHenning
Copy link
Member

After a discussion with Sean today, it became clear that a number of changes would really help future-proof the maintainability of metrics logged in the app. Specifically:

  • We should introduce a new proto enum to define all possible event IDs.
  • We should introduce a property for all events that provides an integer-based ordinal of the event's proto enum property. This will act as a long-term, immutable ID that can be queried instead of the event_name property (so that we can change that later on without concern).
  • A new proto & textproto should be introduced (along with parity tests) to map all event IDs to human-readable strings.
  • Logging should be updated to use an event's human-readable string as its event_name instead of the current definitions.
  • A separate textproto file should be introduced for the Kenya study that uses the old names for parity.
  • A new flavor of the app should be introduced specifically for the Kenya study that also selects the separate textproto file in order to configure the events accordingly (using a Bazel select setup, probably).
@BenHenning BenHenning added this to the Beta MR1 milestone Jun 9, 2022
@BenHenning
Copy link
Member Author

BenHenning commented Jun 9, 2022

Note that it's probably important to get this in for beta MR1 so that the first time we start receiving production metrics will be in a way suitable for long-term querying and aggregation (i.e. using the new, forward-compatible ordinal).

@Broppia Broppia added the Impact: Medium Moderate perceived user impact (non-blocking bugs and general improvements). label Jun 10, 2022
@BenHenning BenHenning self-assigned this Jun 11, 2022
@BenHenning
Copy link
Member Author

Note a couple of things:

  1. The Kenya study-specific flavor is being introduced as part of Create Kenya study-specific build flavor & version codes #4410
  2. I decided to go with a code approach to this to both simplify things (can use the existing oneof typecase enum rather than creating a new enum altogether) and so that Kotlin can enforce comprehension on the enum constants in case a new one is added

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Impact: Medium Moderate perceived user impact (non-blocking bugs and general improvements). Z-ibt Temporary label for Ben to keep track of issues he's triaged.
Development

Successfully merging a pull request may close this issue.

3 participants