From 548915cd8040b0705fad051d9d7a7031fdbd0fff Mon Sep 17 00:00:00 2001 From: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com> Date: Wed, 6 Oct 2021 21:07:28 +0400 Subject: [PATCH] Make OTLP/HTTP the recommended default transport (#1969) Resolves https://github.com/open-telemetry/opentelemetry-specification/issues/1885 - Strongly recommend SDKs to implement both OTLP/gRPC and OTLP/HTTP+Protobuf exporters. - Strongly recommend OTLP/HTTP+Protobuf to be the default protocol but allow language SDKs to choose a different default if they have good reasons. --- CHANGELOG.md | 2 ++ specification/protocol/exporter.md | 11 ++++++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f14390c8e4c..da4d750990d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,6 +26,8 @@ release. ### OpenTelemetry Protocol +- Make OTLP/HTTP the recommended default transport ([#1969](https://github.com/open-telemetry/opentelemetry-specification/pull/1969)) + ### SDK Configuration ## v1.7.0 (2021-09-30) diff --git a/specification/protocol/exporter.md b/specification/protocol/exporter.md index c149bb8ba5f..429be0af077 100644 --- a/specification/protocol/exporter.md +++ b/specification/protocol/exporter.md @@ -17,7 +17,7 @@ The following configuration options MUST be available to configure the OTLP expo | Headers | Key-value pairs to be used as headers associated with gRPC or HTTP requests. See [Specifying headers](./exporter.md#specifying-headers-via-environment-variables) for more details. | n/a | `OTEL_EXPORTER_OTLP_HEADERS` `OTEL_EXPORTER_OTLP_TRACES_HEADERS` `OTEL_EXPORTER_OTLP_METRICS_HEADERS` | | Compression | Compression key for supported compression types. Supported compression: `gzip`| No value [1] | `OTEL_EXPORTER_OTLP_COMPRESSION` `OTEL_EXPORTER_OTLP_TRACES_COMPRESSION` `OTEL_EXPORTER_OTLP_METRICS_COMPRESSION` | | Timeout | Maximum time the OTLP exporter will wait for each batch export. | 10s | `OTEL_EXPORTER_OTLP_TIMEOUT` `OTEL_EXPORTER_OTLP_TRACES_TIMEOUT` `OTEL_EXPORTER_OTLP_METRICS_TIMEOUT` | -| Protocol | The transport protocol. Options MAY include `grpc`, `http/protobuf`, and `http/json`. See [Specify Protocol](./exporter.md#specify-protocol) for more details. | n/a | `OTEL_EXPORTER_OTLP_PROTOCOL` `OTEL_EXPORTER_OTLP_TRACES_PROTOCOL` `OTEL_EXPORTER_OTLP_METRICS_PROTOCOL` | +| Protocol | The transport protocol. Options MAY include `grpc`, `http/protobuf`, and `http/json`. See [Specify Protocol](./exporter.md#specify-protocol) for more details. | `http/protobuf` [2] | `OTEL_EXPORTER_OTLP_PROTOCOL` `OTEL_EXPORTER_OTLP_TRACES_PROTOCOL` `OTEL_EXPORTER_OTLP_METRICS_PROTOCOL` | **[1]**: If no compression value is explicitly specified, SIGs can default to the value they deem most useful among the supported options. This is especially important in the presence of technical constraints, @@ -95,9 +95,14 @@ The `OTEL_EXPORTER_OTLP_PROTOCOL`, `OTEL_EXPORTER_OTLP_TRACES_PROTOCOL`, and `OT - `http/protobuf` for protobuf-encoded data over HTTP connection - `http/json` for JSON-encoded data over HTTP connection -SDKs MUST support either `grpc` or `http/protobuf` and SHOULD support both. They also MAY support `http/json`. +**[2]**: SDKs SHOULD support both `grpc` and `http/protobuf` transports and MUST +support at least one of them. If they support only one, it SHOULD be +`http/protobuf`. They also MAY support `http/json`. -SDKs have an unspecified default, if no configuration is provided. +If no configuration is provided the default transport SHOULD be `http/protobuf` +unless SDKs have good reasons to choose `grpc` as the default (e.g. for backward +compatibility reasons when `grpc` was already the default in a stable SDK +release). ### Specifying headers via environment variables