Skip to content
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

Merged
merged 2 commits into from
Nov 22, 2019

Conversation

harvsu
Copy link
Contributor

@harvsu harvsu commented Nov 21, 2019

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.

@codecov
Copy link

codecov bot commented Nov 21, 2019

Codecov Report

Merging #437 into master will increase coverage by 0.42%.
The diff coverage is 83.07%.

@@             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

@harvsu harvsu force-pushed the user-agent-reform-add-no-replacement branch 3 times, most recently from 3cb8fb5 to ce08195 Compare November 21, 2019 06:01
@harvsu harvsu changed the title Add new User Agent to TelemetryClient Add Reformed User Agent to Telemetry Client Nov 21, 2019
@harvsu harvsu force-pushed the user-agent-reform-add-no-replacement branch from 2c93fb3 to 98ab3fb Compare November 21, 2019 20:14
Copy link
Contributor

@alfwatt alfwatt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Copy link
Contributor

@nkukday nkukday left a 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 🚀

@harvsu harvsu force-pushed the user-agent-reform-add-no-replacement branch 4 times, most recently from 891df30 to 026e432 Compare November 21, 2019 22:50
@nkukday
Copy link
Contributor

nkukday commented Nov 21, 2019

let's update CHANGELOG.md with details for this change

@harvsu harvsu force-pushed the user-agent-reform-add-no-replacement branch from 026e432 to b3c6ec7 Compare November 22, 2019 00:12
Copy link
Contributor

@alfwatt alfwatt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comments Inline

@harvsu harvsu force-pushed the user-agent-reform-add-no-replacement branch from 1b9109c to f697df1 Compare November 22, 2019 21:18
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)
@harvsu harvsu force-pushed the user-agent-reform-add-no-replacement branch from e2a72bc to e587698 Compare November 22, 2019 21:25
@harvsu harvsu merged commit 1584ffe into master Nov 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants