From 3f63b413b50eb98d02a0141a336573842bc78ed7 Mon Sep 17 00:00:00 2001 From: Gil Raphaelli Date: Thu, 17 Oct 2024 19:56:49 -0400 Subject: [PATCH 1/4] update to valid otlp receiver config With recent versions of OpenTelemetry Collector it is necessary to specify protocols --- .../open-telemetry/otel-direct.asciidoc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/en/observability/apm/collect-application-data/open-telemetry/otel-direct.asciidoc b/docs/en/observability/apm/collect-application-data/open-telemetry/otel-direct.asciidoc index 9761a73dbf..9df677e537 100644 --- a/docs/en/observability/apm/collect-application-data/open-telemetry/otel-direct.asciidoc +++ b/docs/en/observability/apm/collect-application-data/open-telemetry/otel-direct.asciidoc @@ -26,7 +26,11 @@ Connect your OpenTelemetry Collector instances to Elastic {observability} using receivers: <1> # ... otlp: - + protocols: + grpc: + endpoint: 0.0.0.0:4317 + http: + endpoint: 0.0.0.0:4318 processors: <2> # ... memory_limiter: From 31508cb7bfa7cb12f613b27e44fe2743f7b91674 Mon Sep 17 00:00:00 2001 From: Gil Raphaelli Date: Thu, 17 Oct 2024 20:04:46 -0400 Subject: [PATCH 2/4] simplify exporter configuration and note advanced option --- .../open-telemetry/otel-direct.asciidoc | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/docs/en/observability/apm/collect-application-data/open-telemetry/otel-direct.asciidoc b/docs/en/observability/apm/collect-application-data/open-telemetry/otel-direct.asciidoc index 9df677e537..d23d7c38af 100644 --- a/docs/en/observability/apm/collect-application-data/open-telemetry/otel-direct.asciidoc +++ b/docs/en/observability/apm/collect-application-data/open-telemetry/otel-direct.asciidoc @@ -41,7 +41,7 @@ processors: <2> exporters: debug: verbosity: detailed <3> - otlp/elastic: <4> + otlp: <4> # Elastic APM server https endpoint without the "https://" prefix endpoint: "${env:ELASTIC_APM_SERVER_ENDPOINT}" <5> <7> headers: @@ -53,15 +53,15 @@ service: traces: receivers: [otlp] processors: [..., memory_limiter, batch] - exporters: [debug, otlp/elastic] + exporters: [debug, otlp] metrics: receivers: [otlp] processors: [..., memory_limiter, batch] - exporters: [debug, otlp/elastic] + exporters: [debug, otlp] logs: <8> receivers: [otlp] processors: [..., memory_limiter, batch] - exporters: [debug, otlp/elastic] + exporters: [debug, otlp] ---- <1> The receivers, like the https://github.com/open-telemetry/opentelemetry-collector/tree/main/receiver/otlpreceiver[OTLP receiver], that forward data emitted by APM agents, or the https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/hostmetricsreceiver[host metrics receiver]. @@ -73,6 +73,7 @@ and the OTLP protocol over HTTP transport https://opentelemetry.io/docs/specs/ot To learn more about these exporters, see the OpenTelemetry Collector documentation: https://github.com/open-telemetry/opentelemetry-collector/tree/main/exporter/otlphttpexporter[OTLP/HTTP Exporter] or https://github.com/open-telemetry/opentelemetry-collector/tree/main/exporter/otlpexporter[OTLP/gRPC exporter]. +When adding an endpoint to an existing configuration an optional name component can be added, like `otlp/elastic`, to distinguish endpoints as described in the [OpenTelemetry Collector Configuration Basics](https://opentelemetry.io/docs/collector/configuration/#basics). <5> Hostname and port of the APM Server endpoint. For example, `elastic-apm-server:8200`. <6> Credential for Elastic APM <> (`Authorization: "Bearer a_secret_token"`) or <> (`Authorization: "ApiKey an_api_key"`). <7> Environment-specific configuration parameters can be conveniently passed in as environment variables documented https://opentelemetry.io/docs/collector/configuration/#environment-variables[here] (e.g. `ELASTIC_APM_SERVER_ENDPOINT` and `ELASTIC_APM_SECRET_TOKEN`). From e793776733710aa00b51553f5673a363ed16aca7 Mon Sep 17 00:00:00 2001 From: Gil Raphaelli Date: Thu, 17 Oct 2024 20:57:27 -0400 Subject: [PATCH 3/4] fix link syntax --- .../open-telemetry/otel-direct.asciidoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/en/observability/apm/collect-application-data/open-telemetry/otel-direct.asciidoc b/docs/en/observability/apm/collect-application-data/open-telemetry/otel-direct.asciidoc index d23d7c38af..79197d6978 100644 --- a/docs/en/observability/apm/collect-application-data/open-telemetry/otel-direct.asciidoc +++ b/docs/en/observability/apm/collect-application-data/open-telemetry/otel-direct.asciidoc @@ -73,7 +73,7 @@ and the OTLP protocol over HTTP transport https://opentelemetry.io/docs/specs/ot To learn more about these exporters, see the OpenTelemetry Collector documentation: https://github.com/open-telemetry/opentelemetry-collector/tree/main/exporter/otlphttpexporter[OTLP/HTTP Exporter] or https://github.com/open-telemetry/opentelemetry-collector/tree/main/exporter/otlpexporter[OTLP/gRPC exporter]. -When adding an endpoint to an existing configuration an optional name component can be added, like `otlp/elastic`, to distinguish endpoints as described in the [OpenTelemetry Collector Configuration Basics](https://opentelemetry.io/docs/collector/configuration/#basics). +When adding an endpoint to an existing configuration an optional name component can be added, like `otlp/elastic`, to distinguish endpoints as described in thehttps://opentelemetry.io/docs/collector/configuration/#basics[OpenTelemetry Collector Configuration Basics]. <5> Hostname and port of the APM Server endpoint. For example, `elastic-apm-server:8200`. <6> Credential for Elastic APM <> (`Authorization: "Bearer a_secret_token"`) or <> (`Authorization: "ApiKey an_api_key"`). <7> Environment-specific configuration parameters can be conveniently passed in as environment variables documented https://opentelemetry.io/docs/collector/configuration/#environment-variables[here] (e.g. `ELASTIC_APM_SERVER_ENDPOINT` and `ELASTIC_APM_SECRET_TOKEN`). From 582ccc85d2bf00e6fed3c50630b7fb33d02df369 Mon Sep 17 00:00:00 2001 From: Gil Raphaelli Date: Fri, 18 Oct 2024 12:43:08 -0400 Subject: [PATCH 4/4] Update docs/en/observability/apm/collect-application-data/open-telemetry/otel-direct.asciidoc Co-authored-by: Arianna Laudazzi <46651782+alaudazzi@users.noreply.github.com> --- .../open-telemetry/otel-direct.asciidoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/en/observability/apm/collect-application-data/open-telemetry/otel-direct.asciidoc b/docs/en/observability/apm/collect-application-data/open-telemetry/otel-direct.asciidoc index 79197d6978..77b8ad3b72 100644 --- a/docs/en/observability/apm/collect-application-data/open-telemetry/otel-direct.asciidoc +++ b/docs/en/observability/apm/collect-application-data/open-telemetry/otel-direct.asciidoc @@ -73,7 +73,7 @@ and the OTLP protocol over HTTP transport https://opentelemetry.io/docs/specs/ot To learn more about these exporters, see the OpenTelemetry Collector documentation: https://github.com/open-telemetry/opentelemetry-collector/tree/main/exporter/otlphttpexporter[OTLP/HTTP Exporter] or https://github.com/open-telemetry/opentelemetry-collector/tree/main/exporter/otlpexporter[OTLP/gRPC exporter]. -When adding an endpoint to an existing configuration an optional name component can be added, like `otlp/elastic`, to distinguish endpoints as described in thehttps://opentelemetry.io/docs/collector/configuration/#basics[OpenTelemetry Collector Configuration Basics]. +When adding an endpoint to an existing configuration an optional name component can be added, like `otlp/elastic`, to distinguish endpoints as described in the https://opentelemetry.io/docs/collector/configuration/#basics[OpenTelemetry Collector Configuration Basics]. <5> Hostname and port of the APM Server endpoint. For example, `elastic-apm-server:8200`. <6> Credential for Elastic APM <> (`Authorization: "Bearer a_secret_token"`) or <> (`Authorization: "ApiKey an_api_key"`). <7> Environment-specific configuration parameters can be conveniently passed in as environment variables documented https://opentelemetry.io/docs/collector/configuration/#environment-variables[here] (e.g. `ELASTIC_APM_SERVER_ENDPOINT` and `ELASTIC_APM_SECRET_TOKEN`).