From 84bcb3908cb6ce00f8247755818788fb21deab1c Mon Sep 17 00:00:00 2001 From: Alex Boten Date: Thu, 21 Jul 2022 11:12:31 -0700 Subject: [PATCH] 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 | 3 +++ specification/protocol/exporter.md | 11 +++++++++++ 2 files changed, 14 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3b49b8972d0..503bf0b1e30 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -64,6 +64,9 @@ release. ### OpenTelemetry Protocol +- Add user agent to OTLP exporter specification + ([#2684](https://github.com/open-telemetry/opentelemetry-specification/pull/2684)) + ### SDK Configuration - Mark `OTEL_METRIC_EXPORT_INTERVAL`, `OTEL_METRIC_EXPORT_TIMEOUT` diff --git a/specification/protocol/exporter.md b/specification/protocol/exporter.md index e194c456279..3a2fd0fffbf 100644 --- a/specification/protocol/exporter.md +++ b/specification/protocol/exporter.md @@ -160,4 +160,15 @@ 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 Exporter Python/1.2.3 +``` + +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