-
Notifications
You must be signed in to change notification settings - Fork 124
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 1646706 - Manage log_pings from core and add docs about debugging through env vars #1058
Conversation
|
||
while (task.tag != FfiPingUploadTask_Done) { | ||
printf("tag: %d\n", task.tag); | ||
|
||
if (task.tag == FfiPingUploadTask_Upload) { | ||
printf("path: %s\n", task.upload.path); | ||
printf("body length: %lld\n", task.upload.body.len); | ||
printf("body length: %d\n", task.upload.body.len); |
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 was getting a warning about this everytime I built the C app. Was there a reason for the previous choice?
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.
Which warning?
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.
cc -I.. -o glean_app glean_app.c ../../../target/debug/libglean_ffi.dylib
glean_app.c:55:41: warning: format specifies type 'long long' but the argument has type
'int32_t' (aka 'int') [-Wformat]
printf("body length: %lld\n", task.upload.body.len);
~~~~ ^~~~~~~~~~~~~~~~~~~~
%d
This is important because test run in parallel, if both tests are changing the same env var at the same time, we get intermittent failures.
83e6759
to
18f80af
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.
I answered your question and left a couple of comments :)
glean-core/android/src/main/java/mozilla/telemetry/glean/config/Configuration.kt
Outdated
Show resolved
Hide resolved
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.
Looks good overall, I left a few comments here and there, but nothing major.
glean-core/android/src/main/java/mozilla/telemetry/glean/Glean.kt
Outdated
Show resolved
Hide resolved
glean-core/android/src/main/java/mozilla/telemetry/glean/config/Configuration.kt
Outdated
Show resolved
Hide resolved
glean-core/android/src/main/java/mozilla/telemetry/glean/config/Configuration.kt
Show resolved
Hide resolved
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.
A few nits and changes I noticed, when digging deeper.
* Separate env vars text in it's own section on iOS docs * Remove env vars text from Android docs and add note about it * Correct exposure of methods in kt and swift * Set default value of `false` to logPings in kt and swift * Set logPings to true before init for tests setup in kt and swift
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.
r+wc!
I also fix an intermittent test failure introduced by the previous PR, I didn't realize this was a problem until I ran some final tests before pushing this branch.
This changes will also fix https://bugzilla.mozilla.org/show_bug.cgi?id=1648007 and https://bugzilla.mozilla.org/show_bug.cgi?id=1648012 for free, in case we only want C# and Python to manage debug optins through environment variables.
Finally I also add docs about debugging through environment variables here.