From 4cd057246f270663e0b57134770f2036988cc80d Mon Sep 17 00:00:00 2001 From: David Luna Date: Wed, 18 Jun 2025 14:15:11 +0200 Subject: [PATCH 01/11] feat(exporters): add user-agent enrichment --- specification/protocol/exporter.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/specification/protocol/exporter.md b/specification/protocol/exporter.md index 5b43d66bdef..6aa4b0d284e 100644 --- a/specification/protocol/exporter.md +++ b/specification/protocol/exporter.md @@ -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 +an environment variable since is meant to be used by [distributions][opentelemetry-distribution] +to append their product identifier along with the exporter's one. + +SDKs MAY expose a similar configuration option if exporters have it. This configuration +MUST be overridable by a signal specific option. + +As an example setting the option to `MyDistribution/x.y.z` in the exporter from the +above example would report the following: + +``` +OTel-OTLP-Exporter-Python/1.2.3 MyDistribution/x.y.z +``` + [Boolean]: ../configuration/sdk-environment-variables.md#boolean [Timeout]: ../configuration/sdk-environment-variables.md#timeout [String]: ../configuration/sdk-environment-variables.md#string @@ -221,3 +236,4 @@ The format of the header SHOULD follow [RFC 7231][rfc-7231]. The conventions use [otlp-http]: https://github.com/open-telemetry/opentelemetry-proto/blob/main/docs/specification.md#otlphttp [retryable-grpc-status-codes]: https://github.com/open-telemetry/opentelemetry-proto/blob/main/docs/specification.md#failures [retryable-http-status-codes]: https://github.com/open-telemetry/opentelemetry-proto/blob/main/docs/specification.md#failures-1 +[opentelemetry-distribution]: https://github.com/open-telemetry/opentelemetry.io/edit/main/content/en/docs/concepts/distributions.md#what-is-a-distribution From d7d96d72f7f792c37444293590d517c118e47b58 Mon Sep 17 00:00:00 2001 From: David Luna Date: Mon, 30 Jun 2025 20:45:11 +0200 Subject: [PATCH 02/11] chore: be more strict about env vars --- specification/protocol/exporter.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/protocol/exporter.md b/specification/protocol/exporter.md index 6aa4b0d284e..7bb83f8e306 100644 --- a/specification/protocol/exporter.md +++ b/specification/protocol/exporter.md @@ -209,7 +209,7 @@ 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 +header as defined in [RFC 7231][rfc-7231]. Such option MUST NOT be available as an environment variable since is meant to be used by [distributions][opentelemetry-distribution] to append their product identifier along with the exporter's one. From 3af4d2adec89b14f92227c9cb4aa283dff39bda7 Mon Sep 17 00:00:00 2001 From: David Luna Date: Tue, 22 Jul 2025 18:26:47 +0200 Subject: [PATCH 03/11] chore: add changelog entry --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 23a27cd2a00..50336c8dad0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -57,6 +57,9 @@ release. ### Common +- Exporters and SDKs may allow devs to append a product identifier in `User-Agent` header. + ([#4560](https://github.com/open-telemetry/opentelemetry-specification/pull/4560)) + ### Supplementary Guidelines ### OTEPs From 2180ed3efd3d7e720096ebeb236f4593eb1d324d Mon Sep 17 00:00:00 2001 From: David Luna Date: Wed, 20 Aug 2025 10:40:22 +0200 Subject: [PATCH 04/11] Update specification/protocol/exporter.md Co-authored-by: Trent Mick --- specification/protocol/exporter.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/protocol/exporter.md b/specification/protocol/exporter.md index a64e6500f6e..769e35d7b77 100644 --- a/specification/protocol/exporter.md +++ b/specification/protocol/exporter.md @@ -238,4 +238,4 @@ OTel-OTLP-Exporter-Python/1.2.3 MyDistribution/x.y.z [otlp-http]: https://github.com/open-telemetry/opentelemetry-proto/blob/main/docs/specification.md#otlphttp [retryable-grpc-status-codes]: https://github.com/open-telemetry/opentelemetry-proto/blob/main/docs/specification.md#failures [retryable-http-status-codes]: https://github.com/open-telemetry/opentelemetry-proto/blob/main/docs/specification.md#failures-1 -[opentelemetry-distribution]: https://github.com/open-telemetry/opentelemetry.io/edit/main/content/en/docs/concepts/distributions.md#what-is-a-distribution +[opentelemetry-distribution]: https://opentelemetry.io/docs/concepts/distributions/ From 9fc03d6510556f5532328da6d337318352a9a762 Mon Sep 17 00:00:00 2001 From: David Luna Date: Wed, 20 Aug 2025 10:45:42 +0200 Subject: [PATCH 05/11] Update specification/protocol/exporter.md Co-authored-by: Trent Mick --- specification/protocol/exporter.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/specification/protocol/exporter.md b/specification/protocol/exporter.md index 769e35d7b77..5f188049928 100644 --- a/specification/protocol/exporter.md +++ b/specification/protocol/exporter.md @@ -210,10 +210,11 @@ 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 MUST NOT be available as -an environment variable since is meant to be used by [distributions][opentelemetry-distribution] -to append their product identifier along with the exporter's one. +Exporters MAY expose a configuration option to add a product identifier to the User-Agent header. The resulting User-Agent SHOULD include the exporter's default User-Agent string. The intention is to support an identifier for an OpenTelemetry SDK/Agent [distribution][opentelemetry-distribution]. Typically an exporter would *prepend* the given identifier to its own. For example: + +``` +MyDistribution/x.y.z OTel-OTLP-Exporter-Python/1.2.3 +``` SDKs MAY expose a similar configuration option if exporters have it. This configuration MUST be overridable by a signal specific option. From 2451ae29c4a4fb8621f9b908cc2e4b8a5266a546 Mon Sep 17 00:00:00 2001 From: David Luna Date: Wed, 20 Aug 2025 10:46:01 +0200 Subject: [PATCH 06/11] Update specification/protocol/exporter.md Co-authored-by: Trent Mick --- specification/protocol/exporter.md | 3 --- 1 file changed, 3 deletions(-) diff --git a/specification/protocol/exporter.md b/specification/protocol/exporter.md index 5f188049928..7873f2621e3 100644 --- a/specification/protocol/exporter.md +++ b/specification/protocol/exporter.md @@ -216,9 +216,6 @@ Exporters MAY expose a configuration option to add a product identifier to the U MyDistribution/x.y.z OTel-OTLP-Exporter-Python/1.2.3 ``` -SDKs MAY expose a similar configuration option if exporters have it. This configuration -MUST be overridable by a signal specific option. - As an example setting the option to `MyDistribution/x.y.z` in the exporter from the above example would report the following: From 41950b9161b1a603671d2d53e0c14af0264f6e56 Mon Sep 17 00:00:00 2001 From: David Luna Date: Wed, 20 Aug 2025 10:46:21 +0200 Subject: [PATCH 07/11] Update specification/protocol/exporter.md Co-authored-by: Trent Mick --- specification/protocol/exporter.md | 6 ------ 1 file changed, 6 deletions(-) diff --git a/specification/protocol/exporter.md b/specification/protocol/exporter.md index 7873f2621e3..a6809998b1e 100644 --- a/specification/protocol/exporter.md +++ b/specification/protocol/exporter.md @@ -216,12 +216,6 @@ Exporters MAY expose a configuration option to add a product identifier to the U MyDistribution/x.y.z OTel-OTLP-Exporter-Python/1.2.3 ``` -As an example setting the option to `MyDistribution/x.y.z` in the exporter from the -above example would report the following: - -``` -OTel-OTLP-Exporter-Python/1.2.3 MyDistribution/x.y.z -``` [Boolean]: ../configuration/sdk-environment-variables.md#boolean [Timeout]: ../configuration/sdk-environment-variables.md#timeout From ba490603427120cca1023803e30726aa9aa56afb Mon Sep 17 00:00:00 2001 From: David Luna Date: Thu, 21 Aug 2025 10:39:26 +0200 Subject: [PATCH 08/11] Update specification/protocol/exporter.md Co-authored-by: Trent Mick --- specification/protocol/exporter.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/specification/protocol/exporter.md b/specification/protocol/exporter.md index a6809998b1e..20c614cc6d1 100644 --- a/specification/protocol/exporter.md +++ b/specification/protocol/exporter.md @@ -215,8 +215,6 @@ Exporters MAY expose a configuration option to add a product identifier to the U ``` MyDistribution/x.y.z OTel-OTLP-Exporter-Python/1.2.3 ``` - - [Boolean]: ../configuration/sdk-environment-variables.md#boolean [Timeout]: ../configuration/sdk-environment-variables.md#timeout [String]: ../configuration/sdk-environment-variables.md#string From f9eaedb32a2413d337e3c94acba714d8876276a8 Mon Sep 17 00:00:00 2001 From: David Luna Date: Thu, 21 Aug 2025 10:41:51 +0200 Subject: [PATCH 09/11] Update CHANGELOG.md Co-authored-by: Cijo Thomas --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 96bf1e71c68..348839c879e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -31,7 +31,7 @@ release. ### Common -- Exporters and SDKs may allow devs to append a product identifier in `User-Agent` header. +- OTLP Exporters may allow devs to append a product identifier in `User-Agent` header. ([#4560](https://github.com/open-telemetry/opentelemetry-specification/pull/4560)) - ⚠️ **IMPORTANT**: Extending the set of standard attribute value types is no longer a breaking change. ([#4614](https://github.com/open-telemetry/opentelemetry-specification/pull/4614)) From 9bc7dca7c29715b837569d4d4dc096a827a51161 Mon Sep 17 00:00:00 2001 From: David Luna Date: Thu, 21 Aug 2025 17:59:57 +0200 Subject: [PATCH 10/11] Update CHANGELOG.md Co-authored-by: Riccardo Magliocchetti --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 348839c879e..893218373ad 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -31,7 +31,7 @@ release. ### Common -- OTLP Exporters may allow devs to append a product identifier in `User-Agent` header. +- OTLP Exporters may allow devs to prepend a product identifier in `User-Agent` header. ([#4560](https://github.com/open-telemetry/opentelemetry-specification/pull/4560)) - ⚠️ **IMPORTANT**: Extending the set of standard attribute value types is no longer a breaking change. ([#4614](https://github.com/open-telemetry/opentelemetry-specification/pull/4614)) From abb5c1bbaac9eaa763ff150d0dfe0c7f80538b95 Mon Sep 17 00:00:00 2001 From: David Luna Date: Thu, 28 Aug 2025 14:42:46 +0200 Subject: [PATCH 11/11] fix: fix lint issue --- specification/protocol/exporter.md | 1 + 1 file changed, 1 insertion(+) diff --git a/specification/protocol/exporter.md b/specification/protocol/exporter.md index 20c614cc6d1..4025d180477 100644 --- a/specification/protocol/exporter.md +++ b/specification/protocol/exporter.md @@ -215,6 +215,7 @@ Exporters MAY expose a configuration option to add a product identifier to the U ``` MyDistribution/x.y.z OTel-OTLP-Exporter-Python/1.2.3 ``` + [Boolean]: ../configuration/sdk-environment-variables.md#boolean [Timeout]: ../configuration/sdk-environment-variables.md#timeout [String]: ../configuration/sdk-environment-variables.md#string