Skip to content

feat(exporters): add user-agent enrichment #4560

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

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

david-luna
Copy link

Fixes #4479

Changes

Document that exporters may allow a user-agent option to append a product identifier to the exporter User Agent header. such option is only available via local var (not environment)

For non-trivial changes, follow the change proposal process.

@david-luna david-luna marked this pull request as ready for review June 23, 2025 14:16
@david-luna david-luna requested review from a team as code owners June 23, 2025 14:16
@@ -208,6 +208,21 @@ OTel-OTLP-Exporter-Python/1.2.3

The format of the header SHOULD follow [RFC 7231][rfc-7231]. The conventions used for specifying the OpenTelemetry SDK language and version are available in the [Resource semantic conventions][resource-semconv].

Exporters MAY expose a configuration option to append a product identifier to the User-Agent
header as defined in [RFC 7231][rfc-7231]. Such option should not be available as
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SHOULD NOT (even MUST NOT?)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with MUST NOT. Thanks @carlosalberto :)

commit d7d96d7

@carlosalberto
Copy link
Contributor

Maybe Collector folks should review this too @mx-psi ?

@mx-psi
Copy link
Member

mx-psi commented Jun 30, 2025

My understanding is that Collector components are not, as a general rule, bound by the spec. I guess we can add this to our coding guidelines in the Collector as well if it gets approved here to make sure it is followed

@david-luna david-luna requested a review from carlosalberto June 30, 2025 18:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[protocol/exporter] allow SDK users to enrich the user-agent header in exporters
4 participants