From 92bc0aaee4506fdc62f47d4758910b69b0245166 Mon Sep 17 00:00:00 2001 From: Paulin Todev Date: Wed, 31 Jul 2024 17:08:47 +0100 Subject: [PATCH] Fix minor issues with the docs --- .../otelcol/otelcol.exporter.debug.md | 26 +++++++------------ .../otelcol/otelcol.exporter.logging.md | 2 +- 2 files changed, 11 insertions(+), 17 deletions(-) diff --git a/docs/sources/reference/components/otelcol/otelcol.exporter.debug.md b/docs/sources/reference/components/otelcol/otelcol.exporter.debug.md index a661ea2234..0f4743cd10 100644 --- a/docs/sources/reference/components/otelcol/otelcol.exporter.debug.md +++ b/docs/sources/reference/components/otelcol/otelcol.exporter.debug.md @@ -85,11 +85,11 @@ Attributes: ``` {{< admonition type="note" >}} -All instances of `\n` in the `"detailed"` example have been replaced with new lines. +All instances of `\n` in the `"detailed"` example have been replaced with new lines. {{< /admonition >}} Setting `use_internal_logger` to `false` is useful if you would like to see actual new lines instead of `\n` in the collector logs. -However, by not using the internal logger you wouldn't see metadata in the log such as `component_id=otelcol.exporter.debug.default`. +However, by not using the internal logger you wouldn't see metadata in the log line such as `component_id=otelcol.exporter.debug.default`. Multiline logs may also be harder to parse. ## Blocks @@ -133,27 +133,21 @@ information. ## Example -This example scrapes Prometheus UNIX metrics and writes them to the console: +This example receives OTLP metrics, logs, and traces and writes them to the console: -```river -prometheus.exporter.unix "default" { } - -prometheus.scrape "default" { - targets = prometheus.exporter.unix.default.targets - forward_to = [otelcol.receiver.prometheus.default.receiver] -} +```alloy +otelcol.receiver.otlp "default" { + grpc {} + http {} -otelcol.receiver.prometheus "default" { output { metrics = [otelcol.exporter.debug.default.input] + logs = [otelcol.exporter.debug.default.input] + traces = [otelcol.exporter.debug.default.input] } } -otelcol.exporter.debug "default" { - verbosity = "detailed" - sampling_initial = 1 - sampling_thereafter = 1 -} +otelcol.exporter.debug "default" {} ``` diff --git a/docs/sources/reference/components/otelcol/otelcol.exporter.logging.md b/docs/sources/reference/components/otelcol/otelcol.exporter.logging.md index 4cda173e9f..dff1c42675 100644 --- a/docs/sources/reference/components/otelcol/otelcol.exporter.logging.md +++ b/docs/sources/reference/components/otelcol/otelcol.exporter.logging.md @@ -90,7 +90,7 @@ information. ## Example -This example scrapes prometheus unix metrics and writes them to the console: +This example receives OTLP metrics, logs, and traces and writes them to the console: ```alloy otelcol.receiver.otlp "default" {