-
Notifications
You must be signed in to change notification settings - Fork 199
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
Pass new user agent prefix for Amplify calls #271
Comments
I did a deep dive last week of the user-agents we have been sending out. Currently in Production:AWS SDK iOSConstructed as part of AWSCore, the user agent looks like the following:
(Note that there can be some variations if you look at line 179 of AWSService.m) Amplify Storage/Predictions & other categories using the AWS SDK iOS (BUT NOT Amplify API/DataStore)Since Jithin’s PR has not been pushed to mainline yet, the user agent should be using the same user agent as the AWS iOS SDK, so therefore, it should be:
Amplify API (and Amplify DataStore):When using IAM or userPools, the user agent is:
When using an APIkey, we are not setting the user agent (this is a bug, and we need to fix this)
AppSyncBased on this link: https://github.com/awslabs/aws-mobile-appsync-sdk-ios/blob/master/AWSAppSyncClient/AWSAppSyncHTTPNetworkTransport.swift#L114
In the short term (prior to P31016485 getting resolved -- e.g. backend parsing being completed):We recommend two immediate changes.
To:
We believe that by making this change, the metrics team will be able to provide us some basic usage metrics (despite not being able to differentiate between actual SDK usage vs amplify usage) Longer term (but hopefully not too long)Sit down with the metrics team to agree on a format for the user agent we send from the amplify clients to the backend services so that we can clearly attribute calls from amplify vs calls from AWS SDK iOS. |
Sync'ed with Mohit from the product side, we have decided that
|
PR here: #273 |
Three more items we should verify w/ charles proxy prior to closing this issue:
|
Currently the API category uses a user agent specified in a constants file (see #75). We need to update this:
Use exact same user agent pattern as we do in the iOS SDK (https://github.com/aws-amplify/aws-sdk-ios/blob/afcce622023a8885ebfc676f6c83e6db8e7d7915/AWSCore/Service/AWSService.m#L158), except change the prefix to "amplify-iOS" instead of "aws-sdk-iOS":
amplify-iOS/<version> <systemName/<systemVersion> <locale>
Use the user agent for all calls into AWS services, not just API calls. This means we'll have to plumb the user agent string to be overwritable by Amplify calls, but not universally overwritable. We'll need to discuss the best way to do this.
The text was updated successfully, but these errors were encountered: