Skip to content

Commit e941d24

Browse files
Update Sample otelcol config (#4397) (#4402)
* update to valid otlp receiver config With recent versions of OpenTelemetry Collector it is necessary to specify protocols * simplify exporter configuration and note advanced option * fix link syntax * Update docs/en/observability/apm/collect-application-data/open-telemetry/otel-direct.asciidoc Co-authored-by: Arianna Laudazzi <[email protected]> --------- Co-authored-by: Arianna Laudazzi <[email protected]> (cherry picked from commit 2ba3a80) Co-authored-by: Gil Raphaelli <[email protected]>
1 parent 4416b29 commit e941d24

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

docs/en/observability/apm/collect-application-data/open-telemetry/otel-direct.asciidoc

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,11 @@ Connect your OpenTelemetry Collector instances to Elastic {observability} using
2626
receivers: <1>
2727
# ...
2828
otlp:
29-
29+
protocols:
30+
grpc:
31+
endpoint: 0.0.0.0:4317
32+
http:
33+
endpoint: 0.0.0.0:4318
3034
processors: <2>
3135
# ...
3236
memory_limiter:
@@ -37,7 +41,7 @@ processors: <2>
3741
exporters:
3842
debug:
3943
verbosity: detailed <3>
40-
otlp/elastic: <4>
44+
otlp: <4>
4145
# Elastic APM server https endpoint without the "https://" prefix
4246
endpoint: "${env:ELASTIC_APM_SERVER_ENDPOINT}" <5> <7>
4347
headers:
@@ -49,15 +53,15 @@ service:
4953
traces:
5054
receivers: [otlp]
5155
processors: [..., memory_limiter, batch]
52-
exporters: [debug, otlp/elastic]
56+
exporters: [debug, otlp]
5357
metrics:
5458
receivers: [otlp]
5559
processors: [..., memory_limiter, batch]
56-
exporters: [debug, otlp/elastic]
60+
exporters: [debug, otlp]
5761
logs: <8>
5862
receivers: [otlp]
5963
processors: [..., memory_limiter, batch]
60-
exporters: [debug, otlp/elastic]
64+
exporters: [debug, otlp]
6165
----
6266
<1> The receivers, like the
6367
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].
@@ -69,6 +73,7 @@ and the OTLP protocol over HTTP transport https://opentelemetry.io/docs/specs/ot
6973
To learn more about these exporters, see the OpenTelemetry Collector documentation:
7074
https://github.com/open-telemetry/opentelemetry-collector/tree/main/exporter/otlphttpexporter[OTLP/HTTP Exporter] or
7175
https://github.com/open-telemetry/opentelemetry-collector/tree/main/exporter/otlpexporter[OTLP/gRPC exporter].
76+
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].
7277
<5> Hostname and port of the APM Server endpoint. For example, `elastic-apm-server:8200`.
7378
<6> Credential for Elastic APM <<apm-secret-token,secret token authorization>> (`Authorization: "Bearer a_secret_token"`) or <<apm-api-key,API key authorization>> (`Authorization: "ApiKey an_api_key"`).
7479
<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`).

0 commit comments

Comments
 (0)