Open david-luna opened 1 week ago
RFC 7231 states:
The User-Agent field-value consists of one or more product identifiers
In the case of OTLP exporters, the product identifier is OpenTelemetry, not the user's application, despite it happening within the said app. So even if some folks may want to override it, and maybe we want to support it, the formal recommendation should probably not be to do so.
Thanks @dmathieu and I agree with you.
I guess the only use case for having access to user agent is if you're creating your own product (like a distribution) based on the SDK an you want to add that info in it right?
Do we need it configurable via an environment variable then? A distribution could modify a local variable, or any other mean to change the value that wouldn't easily be available to end-users.
We had this question in yesterday's JS SIG (2024-09-25) and originates from the issue I've opened a while ago https://github.com/open-telemetry/opentelemetry-js/issues/4447
From the spec:
User-Agent
is a header too but in some implementations exporters usually set it up following the recommendation in the spec and it cannot be modified see:Should we allow to override the header although the user might not follow the spec?