Update UserAgent to include version and platform information
Problem to Solve
Currently the user agent for glab
is just GLab - GitLab CLI
. This makes it challenging to discern any useful information about users who are connecting (what OS/platform) or discern which version of the cli they might be using.
Proposal
We should consider adding some variables to the CLI that help provide us information on:
- Platform - mac, windows, linux. Having this information would better allow us to understand at a high level distribution channels and optimize how we approach bugs/features across product.
- Version - because many users won't update the CLI regularly, it'll be important to understand version information from users connecting so that we know what features we can deprecate, add, fix bugs for and what might be reasonable from a support lifecycle.
- Go Version - it potentially also makes sense to include the Go version of the platform where the command is executed. This will make it easier to understand what versions we need to support.
Testing
(Quad planning review) Unit tests to be added to ensure agent info is being sent.
Edited by Jay McCure