fix(provider): set User-Agent on clients that were missing it#2593
Open
fix(provider): set User-Agent on clients that were missing it#2593
Conversation
Contributor
|
In order to lower resource usage and have a faster runtime, PRs will not run Cloud tests automatically. |
81b3be5 to
10fe35c
Compare
The Grafana OpenAPI, SLO, and CloudProvider clients were not setting the User-Agent header, making it impossible to identify the source of API requests in server logs.
10fe35c to
6bb5f80
Compare
Contributor
|
In order to lower resource usage and have a faster runtime, PRs will not run Cloud tests automatically. |
rooneyshuman
approved these changes
Apr 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
User-Agentheader on the Grafana OpenAPI, SLO, and CloudProvider clientsUserAgentconfig, making API requests appear as generic Go or OpenAPI-Generator clients in server logsClients not covered
The following clients need upstream library changes to support setting User-Agent:
machine-learning-go-client): TheConfigstruct has noUserAgentor headers field. Would need either an upstream addition or an HTTP transport wrapper.synthetic-monitoring-api-go-client): Only supportsX-Client-ID/X-Client-Versioncustom headers viaSetCustomClientID/SetCustomClientVersion. NoUser-Agentsupport. Same options: upstream change or transport wrapper.Both could be worked around with an
http.RoundTripperwrapper that injects the header, but the cleaner path is addingUserAgentsupport upstream in those libraries.Clients already covered
AppPlatform, Cloud (gcom), OnCall, Connections, FleetManagement, FrontendO11y, Asserts, and K6 clients already set
UserAgentcorrectly.Test plan
User-Agentheader appears in Grafana server logs for OpenAPI client requestsUser-Agentheader appears for SLO API requestsUser-Agentheader appears for CloudProvider API requests