-
Notifications
You must be signed in to change notification settings - Fork 121
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
Add locale metric to metrics ping #633
Conversation
63da81b
to
f25d29c
Compare
Hm, the tests failing here are tests such as I could of course add an exception and say that if there is only locale in the metrics ping that means it is still empty, but that is not the prettiest solution. Second option would be to circle back and reconsider adding locale to the client_info. I am sure that are more options that I haven't thought of. Ideas? |
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.
Just commenting. Obviously the code changes are fine (with the exception of the test failure you already pointed out).
The name "glean.baseline.locale" is a bit unfortunate. We could instead make a new metric "l10n.locale" or something, but then it would exist in different names in the baseline and metrics pings. Lots of suboptimal options here... Not sure of the best way forward.
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.
I'm not sure I like having this trigger the metrics ping to always be sent, but I'm less of a fan of special code to handle one special metric to prevent it. If that's the choices then my vote is to put this in client_info, which this does seem like client_info material...
The naming issue is indeed unfortunate. I defer a decision on that to Dexter. Re the test: that one can be fixed by using an adhoc-created custom ping, that's definitely gonna be empty then. |
Yeah :\ I wish we named it better back then :( We have a few options.
I'd lean towards 2. With respect to "always" sending the 'metrics' ping, this makes it no worse than the current state, already: GeckoView introduced a 'user' lifetime metric that will always make the 'metrics' ping available... |
f25d29c
to
834d78a
Compare
Codecov Report
@@ Coverage Diff @@
## master #633 +/- ##
============================================
+ Coverage 74.65% 74.66% +<.01%
Complexity 265 265
============================================
Files 96 96
Lines 5942 5944 +2
Branches 731 731
============================================
+ Hits 4436 4438 +2
Misses 971 971
Partials 535 535
Continue to review full report at Codecov.
|
596ef38
to
189c4ac
Compare
After discussions in IRC, we came to the conclusion that the best option was to add this to the client_info. This is the case because then we don't always send the metrics ping. Always sending it turns out to change way more behaviour than expected. All tests will fail here, because this changes need to be added to I thought it would be best to leave the locale in the baseline ping body as well for now, even though it is redundant, so we can do as suggested be @Dexterp37 and remove that later. |
One trick here that can let you check your tests is to change this line to point to your mozilla-pipeline-schma branch ;-)
That's fine. Please do file a bug about removing that. |
I've done this locally and all tests pass :) One more thing, just for illustration purposes, this is what the new client_info will look like. I have some manual testing locally too: "client_info": {
"android_sdk_version": "25",
"app_build": "1",
"app_display_version": "1.0",
"architecture": "x86_64",
"client_id": "43359b2d-30f5-4bdf-a2f6-cbc956bcfa9a",
"device_manufacturer": "unknown",
"device_model": "Android SDK built for x86_64",
"first_run_date": "2020-01-15+00:00",
"locale": "en-US",
"os": "Android",
"os_version": "7.1.1",
"telemetry_sdk_build": "24.0.0"
} |
0416503
to
90e0aaf
Compare
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.
Please add an entry to the changelog file.
Additionally, please do file a bug about removing the glean.baseline.locale
metric.
Now blocked by: https://bugzilla.mozilla.org/show_bug.cgi?id=1609892 |
90e0aaf
to
90ec1f5
Compare
90ec1f5
to
64ea5bf
Compare
Unblocked by 64ea5bf :) If all turns out green in CI I will just add the changes to the changelog and this should be ready for final review. |
64ea5bf
to
1f3ff47
Compare
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.
\o/
@@ -23,7 +23,7 @@ apply plugin: 'jacoco' | |||
* created during unit testing. | |||
* This uses a specific version of the schema identified by a git commit hash. | |||
*/ | |||
String GLEAN_PING_SCHEMA_GIT_HASH = "a56043b" | |||
String GLEAN_PING_SCHEMA_GIT_HASH = "f2a7ce4" |
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.
This looks right to me -- this is the current master of MPS, which has the locale field in it.
1f3ff47
to
25a566d
Compare
25a566d
to
019f090
Compare
Fixes Bug 1601489
This is how this will look in the metrics ping: