-
Notifications
You must be signed in to change notification settings - Fork 35
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
Integrate the telemetry events #565
Conversation
* dev: (34 commits) Use the junit version declared in versions.gradle (#588) Adding junit version declaration to versions.gradle (#587) Update Travis-CI build SDK version 27 -> 28, Fix AndroidX Compat (#581) Throttle Telemetry with Shared pref on broker switch (#583) Version + change log update Set the InteractiveTokenCommand to null once it has finished (#580) Updated log Formatting changes Adding null safety check to avoid crash if broadcast is sent multiple times Migrate to AndroidX (#575) Removing commented out line (#578) Change log update Version update to remove RC Read user info id from the request bundle on silent request (#574) New CI config (#573) Adding flexibility around pwd_exp return type, string, int, long (#572) Disabling tests on travis Change log update Bump common version to 0.0.12 Fix True MAM silent call scenerio (#570) ...
* dev: First pass, app registry implementation (#591)
Fix the correlation id bug
* dev: Handle the app installation link for browser flow (#611) Correcting javadoc (#610) Fix the back-compat of hello() (#606) Closes #607, #604 (#608) Adds implementation for OpenIdConfig (#605) Add PCA initialization error strings (#598) Change log update Do not load access tokens from foci cache fallback logic (#599) Update to 0.0.16 (#596) Add clearBrokerSecretKeys() (#595) Fix for foci lookups relative to migration (#594) Change telemetry type from 'session' to 'event' (#592)
Resolve PMD issues.
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.
Unit tests are failing
Fix the failed unit tests.
* dev: Added some additional logging
@iambmelt Thank you, Brian. Fixed. |
common/src/main/java/com/microsoft/identity/common/internal/net/HttpRequest.java
Outdated
Show resolved
Hide resolved
...on/src/main/java/com/microsoft/identity/common/internal/telemetry/events/HttpStartEvent.java
Outdated
Show resolved
Hide resolved
...c/main/java/com/microsoft/identity/common/internal/telemetry/rules/TelemetryPiiOiiRules.java
Show resolved
Hide resolved
common/src/main/java/com/microsoft/identity/common/internal/net/HttpRequest.java
Show resolved
Hide resolved
common/src/main/java/com/microsoft/identity/common/internal/net/HttpRequest.java
Outdated
Show resolved
Hide resolved
@heidijinxujia Correct me if I'm wrong; looks like there's a handful of scenarios not fully captured here. Caching
Am I correct in assuming these are TODO? |
...va/com/microsoft/identity/common/internal/telemetry/adapter/TelemetryAggregationAdapter.java
Show resolved
Hide resolved
...va/com/microsoft/identity/common/internal/telemetry/adapter/TelemetryAggregationAdapter.java
Show resolved
Hide resolved
...va/com/microsoft/identity/common/internal/telemetry/adapter/TelemetryAggregationAdapter.java
Outdated
Show resolved
Hide resolved
...va/com/microsoft/identity/common/internal/telemetry/adapter/TelemetryAggregationAdapter.java
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.
Couple of questions, suggestions around calculateEventResponseTime
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.
left a few comments. Thanks!
@@ -74,15 +79,18 @@ public boolean isNetworkDisabledFromOptimizations() { | |||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { | |||
final UsageStatsManagerWrapper usageStatsManagerWrapper = UsageStatsManagerWrapper.getInstance(); | |||
if (usageStatsManagerWrapper.isAppInactive(mConnectionContext)) { | |||
Telemetry.emit((BaseEvent) new BaseEvent().put(TelemetryEventStrings.Key.POWER_OPTIMIZATION, String.valueOf(true))); |
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.
Would this be misleading? (as 'true' here means Broker app is in standby - it doesn't necessary means that power optimization is on).
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.
The aim of this function isNetworkDisabledFromOptimizations()
is to check if the network is not functional because of power optimization.
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.
Is that the same for telemetry event?
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.
The telemetry here is to track the power optimization is on. The telemetry for the network unavailable is in the calling method.
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 let me know if you prefer another naming of the property.
...main/java/com/microsoft/identity/common/internal/providers/oauth2/AuthorizationActivity.java
Show resolved
Hide resolved
...on/src/main/java/com/microsoft/identity/common/internal/telemetry/TelemetryEventStrings.java
Show resolved
Hide resolved
...va/com/microsoft/identity/common/internal/telemetry/adapter/TelemetryAggregationAdapter.java
Outdated
Show resolved
Hide resolved
* dev: Add keyvault and labapi to common's settings.gradle Add keyvault and labapi to common
@iambmelt Thanks a lot for the reviews, could you have another round of look? |
Update the api events and add constants for telemetry string.
Related PR for MSAL: AzureAD/microsoft-authentication-library-for-android#692