Skip to content

Adding client type and client name to user agent #1218

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

Merged
merged 2 commits into from
Apr 25, 2019

Conversation

spfink
Copy link
Contributor

@spfink spfink commented Apr 19, 2019

Adds the client type (sync/async/unknown) and client name (Apache/NettyNio/UrlConnection/Etc) to the user agent in the form of clientType/clientName (sync/Apache).

Motivation and Context

Allows us to track which clients are being used for a request.

Testing

Updated existing tests
Added interceptor to S3 tests to verify user agent on sync and async client

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

Checklist

  • I have read the CONTRIBUTING document
  • Local run of mvn install succeeds
  • My code follows the code style of this project
  • My change requires a change to the Javadoc documentation
  • I have updated the Javadoc documentation accordingly
  • I have read the README document
  • I have added tests to cover my changes
  • All new and existing tests passed
  • A short description of the change has been added to the CHANGELOG
  • My change is to implement 1.11 parity feature and I have updated LaunchChangelog

License

  • I confirm that this pull request can be released under the Apache 2 license

@millems
Copy link
Contributor

millems commented Apr 19, 2019

Can we review this format with the metrics team, and make sure we're not exceeding any length limits?

@codecov-io
Copy link

codecov-io commented Apr 19, 2019

Codecov Report

Merging #1218 into master will decrease coverage by <.01%.
The diff coverage is 68%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #1218      +/-   ##
============================================
- Coverage     59.18%   59.18%   -0.01%     
- Complexity     4659     4660       +1     
============================================
  Files           750      750              
  Lines         23267    23291      +24     
  Branches       1742     1744       +2     
============================================
+ Hits          13771    13784      +13     
- Misses         8800     8810      +10     
- Partials        696      697       +1
Impacted Files Coverage Δ Complexity Δ
...e/amazon/awssdk/http/async/SdkAsyncHttpClient.java 0% <0%> (ø) 0 <0> (ø) ⬇️
...ava/software/amazon/awssdk/http/SdkHttpClient.java 0% <0%> (ø) 0 <0> (ø) ⬇️
...k/core/client/builder/SdkDefaultClientBuilder.java 82.4% <0%> (-0.78%) 29 <0> (ø)
...awssdk/http/nio/netty/NettyNioAsyncHttpClient.java 59.83% <0%> (-0.5%) 16 <0> (ø)
...dk/http/urlconnection/UrlConnectionHttpClient.java 82.92% <0%> (-1.03%) 15 <0> (ø)
...re/amazon/awssdk/http/apache/ApacheHttpClient.java 70% <0%> (-0.4%) 27 <0> (ø)
...n/java/software/amazon/awssdk/core/ClientType.java 87.5% <100%> (+1.78%) 2 <0> (ø) ⬇️
...rnal/http/pipeline/stages/ApplyUserAgentStage.java 75.6% <88.23%> (+8.94%) 8 <2> (+3) ⬆️
...nio/netty/internal/OldConnectionReaperHandler.java 81.81% <0%> (-9.1%) 12% <0%> (-1%)
...on/awssdk/services/kinesis/KinesisRetryPolicy.java 85.71% <0%> (ø) 2% <0%> (-1%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8777eb0...53159ae. Read the comment docs.

@dagnir
Copy link
Contributor

dagnir commented Apr 22, 2019

Code LGTM. Per discussion today, waiting on updating the names.

@spfink spfink force-pushed the finks/client-user-agents branch from f3bea93 to 16ac145 Compare April 24, 2019 23:42
@spfink
Copy link
Contributor Author

spfink commented Apr 24, 2019

Updated to io/[sync/async] and http/[Apache/Netty/UrlConnection]

Copy link
Contributor

@dagnir dagnir left a comment

Choose a reason for hiding this comment

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

:shipit:

@spfink spfink force-pushed the finks/client-user-agents branch from 1597595 to 335d8cf Compare April 25, 2019 16:34
@spfink spfink merged commit edf8f9f into master Apr 25, 2019
@spfink spfink deleted the finks/client-user-agents branch March 17, 2020 23:41
aws-sdk-java-automation added a commit that referenced this pull request Mar 10, 2021
…1e6171039

Pull request: release <- staging/b235279d-101a-4328-852c-bcf1e6171039
This was referenced Mar 10, 2021
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.

4 participants