guac
guac copied to clipboard
Set user agent for collector calls to "GUAC"
It will be useful for debugging and also to determine if services are being clobbered to attribute to our collectors.
This can probably be implemented by setting the "User Agent" request header for requests with a user agent of "GUAC-collector vX-hash" or something.
This should cover, all collectors that connect to services (oci, deps.dev, osv.dev, github, etc.)...
The priority should be on:
- [x] deps.dev
- [x] osv.dev
- [x] oci
- [x] gcs
- [x] github
- [ ] git
(in that order, since they are most likely to be hit more)
As an additional item, it's helpful for debugging to encode the version into the string.
updated comment to include verison and maybe commit hash
Am I understanding this correctly that we want the HTTP requests, originating from various collectors or even certifiers, to the GUAC graphql server (API) with User-Agent header set?
And the goal is to enable the ability to get stats on the graphql server to understand usage patterns, volume, help t-shooting...etc.?
Updated top comment with status after #781 has now merged.
https://github.com/google/osv-scanner/pull/357 was just merged, so that one can be done next.
I didn't see an easy way to set it for the plain git collector, need to look a little deeper there.
Osv.dev now done, checklist in top comment updated. We can probably remove the priority label and v0.1 milestone, and keep this around in case we want to address plain git in the future.
Will look at #781 to understand the changes that need to be implemented for git.