Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Sample otelcol config #4397

Merged
merged 4 commits into from
Oct 18, 2024
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -37,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:
Expand All @@ -49,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].
Expand All @@ -69,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 thehttps://opentelemetry.io/docs/collector/configuration/#basics[OpenTelemetry Collector Configuration Basics].
graphaelli marked this conversation as resolved.
Show resolved Hide resolved
<5> Hostname and port of the APM Server endpoint. For example, `elastic-apm-server:8200`.
<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"`).
<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`).
Expand Down