From 6bb57201417d7ca7af2b6cfa141dae86790b8f82 Mon Sep 17 00:00:00 2001 From: Goutham Date: Thu, 3 Aug 2023 00:11:36 +0200 Subject: [PATCH 1/3] Add initial OTLP ingestion docs We still need a guide that we can link users to in https://github.com/prometheus/docs/tree/main/content/docs/guides This guide should show sending metrics from application directly via the OTel SDKs and also sending through the Collector. Signed-off-by: Goutham --- docs/feature_flags.md | 8 ++++++++ docs/querying/api.md | 13 +++++++++++++ 2 files changed, 21 insertions(+) diff --git a/docs/feature_flags.md b/docs/feature_flags.md index 58e49e3b4..1cf54c47f 100644 --- a/docs/feature_flags.md +++ b/docs/feature_flags.md @@ -126,3 +126,11 @@ still ingest those conventional histograms that do not come with a corresponding native histogram. However, if a native histogram is present, Prometheus will ignore the corresponding conventional histogram, with the notable exception of exemplars, which are always ingested. + +## OTLP Receiver + +`--enable-feature=otlp-write-receiver` + +The OTLP receiver allows Prometheus to accept [OpenTelemetry](https://opentelemetry.io/) metrics writes. +Prometheus is best used as a Pull based system, and staleness, `up` metric, and other Pull enabled features +won't work when you push OTLP metrics. \ No newline at end of file diff --git a/docs/querying/api.md b/docs/querying/api.md index ca7f64f62..da74f55cf 100644 --- a/docs/querying/api.md +++ b/docs/querying/api.md @@ -1294,3 +1294,16 @@ Enable the remote write receiver by setting endpoint is `/api/v1/write`. Find more details [here](../storage.md#overview). *New in v2.33* + +## OTLP Receiver + +Prometheus can be configured as a receiver for the OTLP Metrics protocol. This +is not considered an efficient way of ingesting samples. Use it +with caution for specific low-volume use cases. It is not yet suitable for +replacing the ingestion via scraping yet. + +Enable the OTLP receiver by the feature flag +`--enable-feature=otlp-write-receiver`. When enabled, the OTLP receiver +endpoint is `/otlp/v1/metrics`. + +*New in v2.47* \ No newline at end of file From 9df36c3e5e2c538fb12a7da251e8716cccb60fd5 Mon Sep 17 00:00:00 2001 From: Goutham Veeramachaneni Date: Thu, 3 Aug 2023 13:56:54 +0200 Subject: [PATCH 2/3] Apply suggestions from code review Co-authored-by: Julien Pivotto Signed-off-by: Goutham Veeramachaneni --- docs/querying/api.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/querying/api.md b/docs/querying/api.md index da74f55cf..8cb9c694b 100644 --- a/docs/querying/api.md +++ b/docs/querying/api.md @@ -1299,8 +1299,8 @@ endpoint is `/api/v1/write`. Find more details [here](../storage.md#overview). Prometheus can be configured as a receiver for the OTLP Metrics protocol. This is not considered an efficient way of ingesting samples. Use it -with caution for specific low-volume use cases. It is not yet suitable for -replacing the ingestion via scraping yet. +with caution for specific low-volume use cases. It is not suitable for +replacing the ingestion via scraping. Enable the OTLP receiver by the feature flag `--enable-feature=otlp-write-receiver`. When enabled, the OTLP receiver From acb1f8a0971becca55e4395bafc35b9a298a24d0 Mon Sep 17 00:00:00 2001 From: Goutham Date: Thu, 3 Aug 2023 14:01:43 +0200 Subject: [PATCH 3/3] Fix API endpoint Signed-off-by: Goutham --- docs/querying/api.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/querying/api.md b/docs/querying/api.md index 8cb9c694b..8ddb834ef 100644 --- a/docs/querying/api.md +++ b/docs/querying/api.md @@ -1304,6 +1304,6 @@ replacing the ingestion via scraping. Enable the OTLP receiver by the feature flag `--enable-feature=otlp-write-receiver`. When enabled, the OTLP receiver -endpoint is `/otlp/v1/metrics`. +endpoint is `/api/v1/otlp/v1/metrics`. *New in v2.47* \ No newline at end of file