Inconsistent user agent version causes problem with usage counters
Problem to Solve
As part of #1130 (closed) we updated the user agent for the GitLab CLI to also include version information. We also updated the regex for the usage counters to account for the new user agent modifications.
However, it looks like there are two issues:
It appears that potentially the regex matching isn't properly escaped for the /v
piece of the user agent. This could mean we're not appropriately counting usage here.
The user agent seems to be intermittently sending the v
before the version in the user agent. In most cases it looks to be included on 1.26.0, but not all of them. In 1.27.1, I didn't find any references to it.
Proposal
We need to:
- Confirm that the regex is working properly
- Adjust the user agent to always send the
v
since we're explicitly tracking against it