From e950aefba127e7634f739f90301cc0c13ce5aa86 Mon Sep 17 00:00:00 2001 From: Alex Boten Date: Thu, 21 Jul 2022 11:12:31 -0700 Subject: [PATCH 1/4] add user agent to OTLP exporter spec The following PR adds a section to the OTLP exporter about setting a user agent. This was implemented in the otel collector and provides users with additional information to troubleshoot their telemetry pipelines with. --- CHANGELOG.md | 2 ++ specification/protocol/exporter.md | 12 ++++++++++++ 2 files changed, 14 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index fe012840717..b460b4231dd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -73,6 +73,8 @@ release. - Add support for partial success in an OTLP export response ([#2696](https://github.com/open-telemetry/opentelemetry-specification/pull/2696)). +- Add user agent to OTLP exporter specification + ([#2684](https://github.com/open-telemetry/opentelemetry-specification/pull/2684)) ### SDK Configuration diff --git a/specification/protocol/exporter.md b/specification/protocol/exporter.md index e194c456279..254c554c256 100644 --- a/specification/protocol/exporter.md +++ b/specification/protocol/exporter.md @@ -160,4 +160,16 @@ Transient errors MUST be handled with a retry strategy. This retry strategy MUST For OTLP/HTTP, the errors `408 (Request Timeout)` and `5xx (Server Errors)` are defined as transient, detailed information about errors can be found in the [HTTP failures section](otlp.md#failures). For the OTLP/gRPC, the full list of the gRPC retryable status codes can be found in the [gRPC response section](otlp.md#otlpgrpc-response). +## User Agent + +OpenTelemetry protocol exporters SHOULD emit a User-Agent header to at a minimum identify the exporter, the language of its implementation, and the version of the exporter. For example, the Python OTLP exporter version 1.2.3 would report the following: + +``` +OpenTelemetry OTLP Exporter Python/1.2.3 +``` + +The format of the header SHOULD follow [RFC 7231][rfc-7231]. The conventions used for specifying the language and version are available in the [Resource semantic conventions][resource-semconv]. + +[resource-semconv]: ../resource/semantic_conventions/README.md#telemetry-sdk [otlphttp-req]: otlp.md#otlphttp-request +[rfc-7231]: https://datatracker.ietf.org/doc/html/rfc7231#section-5.5.3 From 26788db9e269c736b1c15dacbfad09680f9c52ed Mon Sep 17 00:00:00 2001 From: Carlos Alberto Cortez Date: Thu, 18 Aug 2022 17:38:05 +0200 Subject: [PATCH 2/4] Update specification/protocol/exporter.md Co-authored-by: Armin Ruech --- 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 254c554c256..d8eb947a723 100644 --- a/specification/protocol/exporter.md +++ b/specification/protocol/exporter.md @@ -168,7 +168,7 @@ OpenTelemetry protocol exporters SHOULD emit a User-Agent header to at a minimum OpenTelemetry OTLP Exporter Python/1.2.3 ``` -The format of the header SHOULD follow [RFC 7231][rfc-7231]. The conventions used for specifying the language and version are available in the [Resource semantic conventions][resource-semconv]. +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]. [resource-semconv]: ../resource/semantic_conventions/README.md#telemetry-sdk [otlphttp-req]: otlp.md#otlphttp-request From ce3c36fe1d37f0d49945c65a9f1e33be3ca150d2 Mon Sep 17 00:00:00 2001 From: Alex Boten Date: Mon, 12 Sep 2022 08:38:53 -0700 Subject: [PATCH 3/4] shorten OpenTelemetry to Otel --- 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 d8eb947a723..c07ba8d7ab0 100644 --- a/specification/protocol/exporter.md +++ b/specification/protocol/exporter.md @@ -165,7 +165,7 @@ For OTLP/HTTP, the errors `408 (Request Timeout)` and `5xx (Server Errors)` are OpenTelemetry protocol exporters SHOULD emit a User-Agent header to at a minimum identify the exporter, the language of its implementation, and the version of the exporter. For example, the Python OTLP exporter version 1.2.3 would report the following: ``` -OpenTelemetry OTLP Exporter Python/1.2.3 +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]. From 1b45b375f03119f14756761f03499bb1377a8931 Mon Sep 17 00:00:00 2001 From: Alex Boten Date: Tue, 20 Sep 2022 08:15:06 -0700 Subject: [PATCH 4/4] update Otel to OTel --- 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 c07ba8d7ab0..0163a0843c5 100644 --- a/specification/protocol/exporter.md +++ b/specification/protocol/exporter.md @@ -165,7 +165,7 @@ For OTLP/HTTP, the errors `408 (Request Timeout)` and `5xx (Server Errors)` are OpenTelemetry protocol exporters SHOULD emit a User-Agent header to at a minimum identify the exporter, the language of its implementation, and the version of the exporter. For example, the Python OTLP exporter version 1.2.3 would report the following: ``` -Otel OTLP Exporter Python/1.2.3 +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].