From 793d8400e502510a84723692db01ef25b099ea13 Mon Sep 17 00:00:00 2001 From: Taylor Cole Date: Thu, 14 Nov 2024 10:07:31 -0800 Subject: [PATCH 1/6] docs: recommend otlp exporter for sending otlp data --- .../configure/configure-otel-collector.md | 61 ++++++++++--------- 1 file changed, 31 insertions(+), 30 deletions(-) diff --git a/docs/sources/mimir/configure/configure-otel-collector.md b/docs/sources/mimir/configure/configure-otel-collector.md index a64bb4ca344..9209a45abe3 100644 --- a/docs/sources/mimir/configure/configure-otel-collector.md +++ b/docs/sources/mimir/configure/configure-otel-collector.md @@ -13,26 +13,25 @@ weight: 150 To send OTel data to Grafana Cloud, refer to [Send data using OpenTelemetry Protocol (OTLP)](https://grafana.com/docs/grafana-cloud/send-data/otlp/send-data-otlp/). {{% /admonition %}} -When using the [OpenTelemetry Collector](https://opentelemetry.io/docs/collector/), you can write metrics into Mimir via two options: `prometheusremotewrite` and `otlphttp`. +When using the [OpenTelemetry Collector](https://opentelemetry.io/docs/collector/), you can write metrics into Mimir using two options: `otlphttp` (preferred) and `prometheusremotewrite`. -We recommend using each protocol's respective exporter and native Mimir endpoint: +Use each protocol's respective exporter and native Mimir endpoint. For example: -- Prometheus data: `prometheusremotewrite` - OTel data: `otlphttp` +- Prometheus data: `prometheusremotewrite` -## Prometheus Remote Write -For the Remote Write, use the [`prometheusremotewrite`](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/exporter/prometheusremotewriteexporter) exporter in the Collector: +## OTLP -In the `exporters` section add: +Mimir supports native OTLP over HTTP. When possible, use this protocol to send OTLP data. To configure the collector to use the OTLP interface, use the [`otlphttp`](https://github.com/open-telemetry/opentelemetry-collector/tree/main/exporter/otlphttpexporter) exporter: ```yaml exporters: - prometheusremotewrite: - endpoint: http:///api/v1/push + otlphttp: + endpoint: http:///otlp ``` -And enable it in the `service.pipelines`: +Then, enable it in `service.pipelines`: ```yaml service: @@ -40,44 +39,46 @@ service: metrics: receivers: [...] processors: [...] - exporters: [..., prometheusremotewrite] + exporters: [..., otlphttp] ``` -If you want to authenticate using basic auth, we recommend the [`basicauth`](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/extension/basicauthextension) extension: +If you want to authenticate using basic auth, use the [`basicauth`](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/extension/basicauthextension) extension: ```yaml extensions: - basicauth/prw: + basicauth/otlp: client_auth: username: username password: password exporters: - prometheusremotewrite: + otlphttp: auth: - authenticator: basicauth/prw - endpoint: http:///api/v1/push + authenticator: basicauth/otlp + endpoint: http:///otlp service: - extensions: [basicauth/prw] + extensions: [basicauth/otlp] pipelines: metrics: receivers: [...] processors: [...] - exporters: [..., prometheusremotewrite] + exporters: [..., otlphttp] ``` -## OTLP +## Prometheus remote write + +For remote write, use the [`prometheusremotewrite`](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/exporter/prometheusremotewriteexporter) exporter in the Collector: -Mimir supports native OTLP over HTTP. To configure the collector to use the OTLP interface, you use the [`otlphttp`](https://github.com/open-telemetry/opentelemetry-collector/tree/main/exporter/otlphttpexporter) exporter: +In the `exporters` section add: ```yaml exporters: - otlphttp: - endpoint: http:///otlp + prometheusremotewrite: + endpoint: http:///api/v1/push ``` -And enable it in `service.pipelines`: +Then, enable it in the `service.pipelines` block: ```yaml service: @@ -85,31 +86,31 @@ service: metrics: receivers: [...] processors: [...] - exporters: [..., otlphttp] + exporters: [..., prometheusremotewrite] ``` -If you want to authenticate using basic auth, we recommend the [`basicauth`](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/extension/basicauthextension) extension: +If you want to authenticate using basic auth, use the [`basicauth`](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/extension/basicauthextension) extension: ```yaml extensions: - basicauth/otlp: + basicauth/prw: client_auth: username: username password: password exporters: - otlphttp: + prometheusremotewrite: auth: - authenticator: basicauth/otlp - endpoint: http:///otlp + authenticator: basicauth/prw + endpoint: http:///api/v1/push service: - extensions: [basicauth/otlp] + extensions: [basicauth/prw] pipelines: metrics: receivers: [...] processors: [...] - exporters: [..., otlphttp] + exporters: [..., prometheusremotewrite] ``` ## Format considerations From 8c4e70d2ef20a4f5f146dcc71cf414cbef25cfa1 Mon Sep 17 00:00:00 2001 From: Taylor Cole Date: Thu, 14 Nov 2024 10:11:56 -0800 Subject: [PATCH 2/6] docs: fix formatting --- docs/sources/mimir/configure/configure-otel-collector.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/sources/mimir/configure/configure-otel-collector.md b/docs/sources/mimir/configure/configure-otel-collector.md index 9209a45abe3..2c42fc998c1 100644 --- a/docs/sources/mimir/configure/configure-otel-collector.md +++ b/docs/sources/mimir/configure/configure-otel-collector.md @@ -68,9 +68,9 @@ service: ## Prometheus remote write -For remote write, use the [`prometheusremotewrite`](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/exporter/prometheusremotewriteexporter) exporter in the Collector: +For remote write, use the [`prometheusremotewrite`](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/exporter/prometheusremotewriteexporter) exporter in the Collector. -In the `exporters` section add: +In the `exporters` section, add: ```yaml exporters: From 28d24010a77a73eaa87d7362d83d5537d0eef705 Mon Sep 17 00:00:00 2001 From: Taylor Cole Date: Thu, 14 Nov 2024 10:20:05 -0800 Subject: [PATCH 3/6] docs: adds make doc --- docs/sources/mimir/configure/configure-otel-collector.md | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/sources/mimir/configure/configure-otel-collector.md b/docs/sources/mimir/configure/configure-otel-collector.md index 2c42fc998c1..799908accaf 100644 --- a/docs/sources/mimir/configure/configure-otel-collector.md +++ b/docs/sources/mimir/configure/configure-otel-collector.md @@ -20,7 +20,6 @@ Use each protocol's respective exporter and native Mimir endpoint. For example: - OTel data: `otlphttp` - Prometheus data: `prometheusremotewrite` - ## OTLP Mimir supports native OTLP over HTTP. When possible, use this protocol to send OTLP data. To configure the collector to use the OTLP interface, use the [`otlphttp`](https://github.com/open-telemetry/opentelemetry-collector/tree/main/exporter/otlphttpexporter) exporter: From b2ec02e94f976cda5837a1a5ff4497b650fb147d Mon Sep 17 00:00:00 2001 From: Taylor Cole Date: Tue, 19 Nov 2024 16:04:59 -0800 Subject: [PATCH 4/6] docs: strongly recommend OTLP and mark Prometheus remote write as experimental --- .../configure/configure-otel-collector.md | 21 +++++++++---------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/docs/sources/mimir/configure/configure-otel-collector.md b/docs/sources/mimir/configure/configure-otel-collector.md index 799908accaf..54fdb8268cd 100644 --- a/docs/sources/mimir/configure/configure-otel-collector.md +++ b/docs/sources/mimir/configure/configure-otel-collector.md @@ -10,19 +10,14 @@ weight: 150 # Configure the OpenTelemetry Collector to write metrics into Mimir {{% admonition type="note" %}} -To send OTel data to Grafana Cloud, refer to [Send data using OpenTelemetry Protocol (OTLP)](https://grafana.com/docs/grafana-cloud/send-data/otlp/send-data-otlp/). +To send OpenTelemetry data to Grafana Cloud, refer to [Send data using OpenTelemetry Protocol (OTLP)](https://grafana.com/docs/grafana-cloud/send-data/otlp/send-data-otlp/). {{% /admonition %}} -When using the [OpenTelemetry Collector](https://opentelemetry.io/docs/collector/), you can write metrics into Mimir using two options: `otlphttp` (preferred) and `prometheusremotewrite`. +When using the [OpenTelemetry Collector](https://opentelemetry.io/docs/collector/), you can use the OpenTelemetry protocol (OTLP) or the Prometheus remote write protocol to write metrics into Mimir. It's recommended that you use the OpenTelemetry protocol. -Use each protocol's respective exporter and native Mimir endpoint. For example: +## Use the OpenTelemetry protocol -- OTel data: `otlphttp` -- Prometheus data: `prometheusremotewrite` - -## OTLP - -Mimir supports native OTLP over HTTP. When possible, use this protocol to send OTLP data. To configure the collector to use the OTLP interface, use the [`otlphttp`](https://github.com/open-telemetry/opentelemetry-collector/tree/main/exporter/otlphttpexporter) exporter: +Mimir supports native OTLP over HTTP. To configure the collector to use the OTLP interface, use the [`otlphttp`](https://github.com/open-telemetry/opentelemetry-collector/tree/main/exporter/otlphttpexporter) exporter and native Mimir endpoint. For example: ```yaml exporters: @@ -65,9 +60,13 @@ service: exporters: [..., otlphttp] ``` -## Prometheus remote write +## Use the Prometheus remote write protocol + +{{< admonition type="note" >}} +Support for the Prometheus remote write protocol is an experimental feature in Mimir. +{{< /admonition >}} -For remote write, use the [`prometheusremotewrite`](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/exporter/prometheusremotewriteexporter) exporter in the Collector. +To use the Prometheus remote write protocol to send metrics into Mimir, use the [`prometheusremotewrite`](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/exporter/prometheusremotewriteexporter) exporter in the Collector and the native Mimir endpoint. In the `exporters` section, add: From 86cb2048f8c0daa1a94252764b324bffac2ad615 Mon Sep 17 00:00:00 2001 From: Taylor C <41653732+tacole02@users.noreply.github.com> Date: Wed, 20 Nov 2024 13:43:43 -0800 Subject: [PATCH 5/6] Update docs/sources/mimir/configure/configure-otel-collector.md Co-authored-by: Arve Knudsen --- docs/sources/mimir/configure/configure-otel-collector.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/sources/mimir/configure/configure-otel-collector.md b/docs/sources/mimir/configure/configure-otel-collector.md index 54fdb8268cd..d00a9c7f58a 100644 --- a/docs/sources/mimir/configure/configure-otel-collector.md +++ b/docs/sources/mimir/configure/configure-otel-collector.md @@ -17,7 +17,7 @@ When using the [OpenTelemetry Collector](https://opentelemetry.io/docs/collector ## Use the OpenTelemetry protocol -Mimir supports native OTLP over HTTP. To configure the collector to use the OTLP interface, use the [`otlphttp`](https://github.com/open-telemetry/opentelemetry-collector/tree/main/exporter/otlphttpexporter) exporter and native Mimir endpoint. For example: +Mimir supports native OTLP over HTTP. To configure the collector to use the OTLP interface, use the [`otlphttp`](https://github.com/open-telemetry/opentelemetry-collector/tree/main/exporter/otlphttpexporter) exporter and the native Mimir endpoint. For example: ```yaml exporters: From 2c699c4a12e32893c092a7bd63f66b82cac3735d Mon Sep 17 00:00:00 2001 From: Taylor Cole Date: Mon, 25 Nov 2024 15:09:26 -0800 Subject: [PATCH 6/6] removes denotation of prometheus remote write as experimental --- .../mimir/configure/configure-otel-collector.md | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/docs/sources/mimir/configure/configure-otel-collector.md b/docs/sources/mimir/configure/configure-otel-collector.md index d00a9c7f58a..26cd6f5c814 100644 --- a/docs/sources/mimir/configure/configure-otel-collector.md +++ b/docs/sources/mimir/configure/configure-otel-collector.md @@ -17,7 +17,7 @@ When using the [OpenTelemetry Collector](https://opentelemetry.io/docs/collector ## Use the OpenTelemetry protocol -Mimir supports native OTLP over HTTP. To configure the collector to use the OTLP interface, use the [`otlphttp`](https://github.com/open-telemetry/opentelemetry-collector/tree/main/exporter/otlphttpexporter) exporter and the native Mimir endpoint. For example: +Mimir supports native OTLP over HTTP. To configure the collector to use the OTLP interface, use the [`otlphttp` exporter](https://github.com/open-telemetry/opentelemetry-collector/tree/main/exporter/otlphttpexporter) and the native Mimir endpoint. For example: ```yaml exporters: @@ -25,7 +25,7 @@ exporters: endpoint: http:///otlp ``` -Then, enable it in `service.pipelines`: +Then, enable it in the `service.pipelines` block: ```yaml service: @@ -36,7 +36,7 @@ service: exporters: [..., otlphttp] ``` -If you want to authenticate using basic auth, use the [`basicauth`](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/extension/basicauthextension) extension: +If you want to authenticate using basic auth, use the [`basicauth`](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/extension/basicauthextension) extension. For example: ```yaml extensions: @@ -62,10 +62,6 @@ service: ## Use the Prometheus remote write protocol -{{< admonition type="note" >}} -Support for the Prometheus remote write protocol is an experimental feature in Mimir. -{{< /admonition >}} - To use the Prometheus remote write protocol to send metrics into Mimir, use the [`prometheusremotewrite`](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/exporter/prometheusremotewriteexporter) exporter in the Collector and the native Mimir endpoint. In the `exporters` section, add: @@ -87,7 +83,7 @@ service: exporters: [..., prometheusremotewrite] ``` -If you want to authenticate using basic auth, use the [`basicauth`](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/extension/basicauthextension) extension: +If you want to authenticate using basic auth, use the [`basicauth`](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/extension/basicauthextension) extension. For example: ```yaml extensions: