-
Notifications
You must be signed in to change notification settings - Fork 584
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
feat: standardize user agent value #1775
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1775 +/- ##
==========================================
- Coverage 79.77% 79.28% -0.50%
==========================================
Files 325 367 +42
Lines 12087 15118 +3031
Branches 2553 3221 +668
==========================================
+ Hits 9643 11987 +2344
- Misses 2444 3131 +687
Continue to review full report at Codecov.
|
44d7875
to
cebf350
Compare
fea75dd
to
8dc5169
Compare
…nfig into new sdk ua header
dcbfaab
to
90a9b74
Compare
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and link to relevant comments in this thread. |
Revisiting this PR to check User Agent values before and after: Node.js:
Browser:
|
The purpose of this change is to standardize the user agent behavior across the AWS tools. A brief summary is:
User-Agent
header:aws-sdk-js/[version]
;x-amz-user-agent
headeraws-sdk-js/[version]
,lang/js
,md/nodejs/[version]
ormd/browser/[version]
ormd/rn/[version]
os/[name]/[version]
api/[serviceId]/[version]
cfg/retry-mode/[mode]
Here's an example UA string:
aws-sdk-js/3.0.0-rc.9 os/linux/4.14.200-155.322.amzn2.x86_64 lang/js md/nodejs/12.14.0 api/iam/3.0.0-rc.9 cfg/retry-mode/standard
In browser, I introduced bowser to make best effort infer the OS and browser version from the UA string. This is so far the best choice considering downloads, size, and GH activities.
TODO: bellows are features to be addressed in following PR:
ft/[paginator, waiter, s3-transfer]
ua to these requests. We need to address the issues with these features before we can add user agent for them.A noteworthy change in this PR is that I added a
UserAgent
abstraction. So users don't need to deal with the string concatenation, instead they can just put the tuple bycontext.userAgent.push(["foo-api", "1.0.0"])
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.