-
Notifications
You must be signed in to change notification settings - Fork 123
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
Bug 1634064 - Implement the 'X-Source-Tags' header #1074
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not giving the green light just yet.
Code-wise this looks mostly good.
I did leave a couple of questions and suggestions inline. IMO we should not break consumers right away.
glean-core/android/src/main/java/mozilla/telemetry/glean/debug/GleanDebugActivity.kt
Show resolved
Hide resolved
glean-core/android/src/main/java/mozilla/telemetry/glean/debug/GleanDebugActivity.kt
Show resolved
Hide resolved
Before this PR, validation functions were also performing the parsing of the data from environment variables. Unfortunately, by being entangled, it was hard to provide options that were not of type `String`. This PR fixes the problem by introducing an `extraction` function: when instantiating a new option, we should define how we want the data to be extracted from environment variables.
This further decouples validation from extraction by making sure the validation function only returns true or false, instead of the validated value.
This option allows specifying a list of tags to be attached to the ping upload requests, in order for the data users or pipeline to tell data apart.
This adds the FFI boilerplate and changes the DebugActivity in order to support the new option. Other language bindings, except for Swift, will be supported using the environment variables.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good, minimal nits and fixing the clippy issues
This implements the new ping tagging system in the Glean SDK. It adds a CLI option for
adb
, all the glean-core implementation and environment variable support.Please note that I had to refactor the debug options module a bit in order to allow using non-
String
option types.