Closed
Description
Currently the user agent for all AutoRest-generated clients is set like this:
HttpClient.DefaultRequestHeaders.UserAgent.Add(new ProductInfoHeaderValue(type.FullName,
GetAssemblyVersion()));
Rather than use the assembly version, which is typically just a major version, it would be more useful to include the full semantic version of the client library (e.g. -- 6.13.1 instead of 6.0.0.0). This helps services use telemetry to track adoption of different versions of the client library.
Even better, ServiceClient
could have a hook to let derived classes set their own UserAgent.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment