-
Notifications
You must be signed in to change notification settings - Fork 517
Fix for longer UserAgent suffix #705
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
Conversation
Can it be abstracted to the scope we need. I.e. may-be
Thoughts? |
The problem is that the initial part comes as part of the UserAgentContainer defined in Direct package, which is used down the stack. The alternative would be to redefine the class? |
@kirankumarkolli I ended up refactoring this PR. The new introduced logic was too complex, so I ended up simplifying this by creating our own UserAgentContainer that inherit from UserAgentContainer from Direct but defines our own base user agent string, with the information we wanted (Package versions, etc) |
Can you please share new user-agent string? |
@kirankumarkolli it's in the PR description, I updated the description when I refactored |
Pull Request Template
Description
This PR applies a refactor on the UserAgentContainer, creating a child class
Cosmos.UserAgentContainer
that has a different base user agent. The new base user agent usesEnvironmentInformation
and generates a format of:{OS}/{Process Architecture} {SDK Version}/{Direct pkg Version}-{Framework} {ClientId} {UserSuffix}
For example:
Microsoft Windows 10.0.18362 /X64 3.1.1/3.1.4-.NET Core 4.6.27617.04 03445 mycustomsuffix
The information is read from the RuntimeEnvironment NET Standard 2.0 https://docs.microsoft.com/en-us/dotnet/api/system.runtime.interopservices.runtimeenvironment?view=netstandard-2.0
Type of change
Please delete options that are not relevant.
Closing issues
Closes #697