-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[exporterhelper] User-Agent header in the Otlp http exporter #8560
Comments
I believe there is already established methods for the user agent getting set within an exporter. For example the Prometheus remote write exporter parses build info and description to build it. The PRWE also uses I believe it could make sense to give the user some agency in determining the values of the user agent header. I would like to challenge the idea of |
@bryan-aguilar, I'm not 100% sure I understood your message. Would you be OK in having the default user agent to be the same as the user agent that the Prometheus Remote Write Exporter uses? It's certainly a good default to me: userAgentHeader := fmt.Sprintf("%s/%s", strings.ReplaceAll(strings.ToLower(set.BuildInfo.Description), " ", "-"), set.BuildInfo.Version) It would yield something like: Letting users customize this would be great, but my concern right now is in providing ways for service owners (ie, those who receive requests from Collectors) to identify the clients sending data to them. |
@antonjim-te, if you are still interested in this, I'd implement it like we have it for the Prometheus Remote Write exporter. We can iterate in the future and allow users to customize. |
Important
Provide the user the capability to set
User-Agent
header in the OTLP HTTP exporter. It will help identify which exporter sends the signal.Is your feature request related to a problem? Please describe.
As you can it has see in the following issue open-telemetry/opentelemetry-collector-contrib#27207 . This new feature will identify the problem's source when receiving signals from different collectors.
Describe the solution you'd like
It will be configurable as part of the HTTPClientSettings and the default will be
otel-collector-vX.Y.X
.Set the header before sending the signal in the POST operation.
Additional context
https://www.geeksforgeeks.org/http-headers-user-agent/
The text was updated successfully, but these errors were encountered: