From f2926c7f679605e6f67308c077fc28d491585648 Mon Sep 17 00:00:00 2001 From: Tigran Najaryan Date: Mon, 27 Sep 2021 12:40:10 -0400 Subject: [PATCH] Change OTLP/HTTP port from 4317 to 4318 (#1839) Related to https://github.com/open-telemetry/opentelemetry-specification/issues/1816 Fixes https://github.com/open-telemetry/opentelemetry-specification/issues/1835 Fixes https://github.com/open-telemetry/opentelemetry-specification/issues/1920 Some historical context: we wanted to make grpc and http use the same port and we had an open issue in the Collector to do so: https://github.com/open-telemetry/opentelemetry-collector/issues/1256 The conclusion is that there are technical hurdles that make it unfeasible: https://github.com/open-telemetry/opentelemetry-collector/issues/1256#issuecomment-880048833 Because of that we need to keep grpc and http ports separate. This means we need to change the spec to say that otlp/http uses port 4318. Once this PR is merged we will also need to submit for port 4318 registration with IANA like we did previously with port 4317: https://github.com/open-telemetry/opentelemetry-specification/issues/1148#issuecomment-725067404 There was also a draft PR to merge the ports in the Collector but it was not completed: https://github.com/open-telemetry/opentelemetry-collector/pull/3765 Note that this change was initially submitted in PR https://github.com/open-telemetry/opentelemetry-specification/pull/1839 and then reverted in PR https://github.com/open-telemetry/opentelemetry-specification/pull/1847 because we hoped that the merging could be successfully done. We believe that we should no longer pursue this and should consider the ports separate from now on. --- CHANGELOG.md | 1 + specification/protocol/exporter.md | 2 +- specification/protocol/otlp.md | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1b93e83d2bc..5582089d5d5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -58,6 +58,7 @@ release. ### OpenTelemetry Protocol - Add environment variables for configuring the OTLP exporter protocol (`grpc`, `http/protobuf`, `http/json`) ([#1880](https://github.com/open-telemetry/opentelemetry-specification/pull/1880)) +- Change OTLP/HTTP port from 4317 to 4318 ### SDK Configuration diff --git a/specification/protocol/exporter.md b/specification/protocol/exporter.md index 5a3268f2f54..917d3336898 100644 --- a/specification/protocol/exporter.md +++ b/specification/protocol/exporter.md @@ -10,7 +10,7 @@ The following configuration options MUST be available to configure the OTLP expo | Configuration Option | Description | Default | Env variable | | -------------------- | ------------------------------------------------------------ | ----------------- | ------------------------------------------------------------ | -| Endpoint (OTLP/HTTP) | Target to which the exporter is going to send spans or metrics. The endpoint MUST be a valid URL with scheme (http or https) and host, and MAY contain a port and path. A scheme of https indicates a secure connection. When using `OTEL_EXPORTER_OTLP_ENDPOINT`, exporters SHOULD follow the collector convention of appending the version and signal to the path (e.g. `v1/traces` or `v1/metrics`), if not present already. The per-signal endpoint configuration options take precedence and can be used to override this behavior. See the [OTLP Specification][otlphttp-req] for more details. | `https://localhost:4317` | `OTEL_EXPORTER_OTLP_ENDPOINT` `OTEL_EXPORTER_OTLP_TRACES_ENDPOINT` `OTEL_EXPORTER_OTLP_METRICS_ENDPOINT` | +| Endpoint (OTLP/HTTP) | Target to which the exporter is going to send spans or metrics. The endpoint MUST be a valid URL with scheme (http or https) and host, and MAY contain a port and path. A scheme of https indicates a secure connection. When using `OTEL_EXPORTER_OTLP_ENDPOINT`, exporters SHOULD follow the collector convention of appending the version and signal to the path (e.g. `v1/traces` or `v1/metrics`), if not present already. The per-signal endpoint configuration options take precedence and can be used to override this behavior. See the [OTLP Specification][otlphttp-req] for more details. | `https://localhost:4318` | `OTEL_EXPORTER_OTLP_ENDPOINT` `OTEL_EXPORTER_OTLP_TRACES_ENDPOINT` `OTEL_EXPORTER_OTLP_METRICS_ENDPOINT` | | Endpoint (OTLP/gRPC) | Target to which the exporter is going to send spans or metrics. The endpoint SHOULD accept any form allowed by the underlying gRPC client implementation. Additionally, the endpoint MUST accept a URL with a scheme of either `http` or `https`. A scheme of `https` indicates a secure connection and takes precedence over the `insecure` configuration setting. If the gRPC client implementation does not support an endpoint with a scheme of `http` or `https` then the endpoint SHOULD be transformed to the most sensible format for that implementation. | `https://localhost:4317` | `OTEL_EXPORTER_OTLP_ENDPOINT` `OTEL_EXPORTER_OTLP_TRACES_ENDPOINT` `OTEL_EXPORTER_OTLP_METRICS_ENDPOINT` | | Insecure | Whether to enable client transport security for the exporter's gRPC connection. This option only applies to OTLP/gRPC - OTLP/HTTP always uses the scheme provided for the `endpoint`. Implementations MAY choose to not implement the `insecure` option if it is not required or supported by the underlying gRPC client implementation. | `false` | `OTEL_EXPORTER_OTLP_INSECURE` `OTEL_EXPORTER_OTLP_SPAN_INSECURE` `OTEL_EXPORTER_OTLP_METRIC_INSECURE` | | Certificate File | The trusted certificate to use when verifying a server's TLS credentials. Should only be used for a secure connection. | n/a | `OTEL_EXPORTER_OTLP_CERTIFICATE` `OTEL_EXPORTER_OTLP_TRACES_CERTIFICATE` `OTEL_EXPORTER_OTLP_METRICS_CERTIFICATE` | diff --git a/specification/protocol/otlp.md b/specification/protocol/otlp.md index 6c83e2dc571..16ffe30fd14 100644 --- a/specification/protocol/otlp.md +++ b/specification/protocol/otlp.md @@ -473,7 +473,7 @@ connections SHOULD be configurable. #### OTLP/HTTP Default Port -The default network port for OTLP/HTTP is 4317. +The default network port for OTLP/HTTP is 4318. ## Implementation Recommendations