From 2c0e70e0f8d477618337432c6bcc3e62cf48cea9 Mon Sep 17 00:00:00 2001 From: Alex Boten <223565+codeboten@users.noreply.github.com> Date: Wed, 27 Nov 2024 12:20:40 -0800 Subject: [PATCH] collector: update internal logs config to include OTLP export This adds the details to emit the Collector's internal logs via OTLP. Fixes #5680 Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com> --- .../en/docs/collector/internal-telemetry.md | 24 ++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/content/en/docs/collector/internal-telemetry.md b/content/en/docs/collector/internal-telemetry.md index b7aa01f34841..47b8a737940d 100644 --- a/content/en/docs/collector/internal-telemetry.md +++ b/content/en/docs/collector/internal-telemetry.md @@ -104,6 +104,21 @@ journalctl | grep otelcol | grep Error {{% /tab %}} {{< /tabpane >}} +The following configuration can be used to emit internal logs from the +Collector to an OTLP/gRPC backend: + +```yaml +service: + telemetry: + logs: + processors: + - batch: + exporter: + otlp: + protocol: grpc/protobuf + endpoint: https://backend:4317 +``` + ### Configure internal traces The Collector does not expose traces by default, but it can be configured to. @@ -141,7 +156,7 @@ Note that the `tracer_provider` section there corresponds to `traces` here. The Collector can be configured to push its own telemetry to an [OTLP receiver](https://github.com/open-telemetry/opentelemetry-collector/tree/main/receiver/otlpreceiver) and send the data through configured pipelines. In the following example, the -Collector is configured to push metrics and traces every 10s using OTLP gRPC to +Collector is configured to push metrics, traces, and logs every 10s using OTLP gRPC to `localhost:14317`: ```yaml @@ -176,6 +191,13 @@ service: otlp: protocol: grpc/protobuf endpoint: http://localhost:14317 + logs: + processors: + - batch: + exporter: + otlp: + protocol: grpc/protobuf + endpoint: http://localhost:14317 ``` {{% alert title="Caution" color="warning" %}}