-
Notifications
You must be signed in to change notification settings - Fork 48
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 Reformed User Agent to Telemetry Client #437
Conversation
Codecov Report
@@ Coverage Diff @@
## master #437 +/- ##
============================================
+ Coverage 68.23% 68.65% +0.42%
- Complexity 383 394 +11
============================================
Files 68 69 +1
Lines 2084 2144 +60
Branches 163 171 +8
============================================
+ Hits 1422 1472 +50
- Misses 571 575 +4
- Partials 91 97 +6 |
3cb8fb5
to
ce08195
Compare
libtelemetry/src/test/java/com/mapbox/android/telemetry/TelemetryClientTest.java
Outdated
Show resolved
Hide resolved
2c93fb3
to
98ab3fb
Compare
libtelemetry/src/androidTest/java/com/mapbox/android/telemetry/TestReformedUserAgent.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.
LGTM!
libcore/src/main/java/com/mapbox/android/core/MapboxSdkInfoForUserAgentGenerator.java
Outdated
Show resolved
Hide resolved
libtelemetry/src/main/java/com/mapbox/android/telemetry/TelemetryUtils.java
Outdated
Show resolved
Hide resolved
libtelemetry/src/main/java/com/mapbox/android/telemetry/TelemetryUtils.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.
we've covered review from #436, API access comment needs to be addressed, otherwise 🚀
891df30
to
026e432
Compare
let's update |
026e432
to
b3c6ec7
Compare
libcore/src/main/java/com/mapbox/android/core/MapboxSdkInfoForUserAgentGenerator.java
Show resolved
Hide resolved
libtelemetry/src/main/java/com/mapbox/android/telemetry/TelemetryClient.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.
Comments Inline
1b9109c
to
f697df1
Compare
Spec: mapbox/mobile-telemetry#423 Add new User agent with header X-Mapbox-User-Agent in addition to current user agent. The new user agent is constructed from host app and Mapbox libraries version information. Update the version for android-sdk-versions-plugin. Update copyright year to 2018-2019 in LICENSE.MD Change publishing license from "The Apache Software License, Version 2.0" to "The MIT License" for consistency. * check params and init client before setting base url * change setBaseUrl() to return boolean fix: typo displacemnt => displacement (#438)
e2a72bc
to
e587698
Compare
… user-agent-reform-add-no-replacement
Auto generate the user agent to include host application and all Mapbox libraries version information according to the following specification.
mapbox/mobile-telemetry#423
Add New user agent(with header
X-Mapbox-User-Agent
) to network requests sent via TelemetryClient (not ConfigurationClient) in addition to the existing user agent that is currently in production.Host Application information is read from package information available at run time and Mapbox library information is available in assets folder (#435). This change reads the information and builds the user agent per format described in the specification.
Note: The new user agent will eventually replace the existing one after the backend is ready to accept this.