Saturday, July 29, 2023

Ingest OpenTelemetry metrics with Prometheus natively

OpenTelemetry and Prometheus are two critical projects in the monitoring and observability world. Prometheus supports metrics monitoring, and OpenTelemetry also allows metrics besides logs and traces.

The semantic convention for metrics in OpenTelemetry(OTLP metrics) does not align with Prometheus' native metrics naming convention.

To address this disparity, there is a module in otel-collector-contrib that offers centralized functions that facilitate the conversion of OpenTelemetry metrics into metrics compliant with Prometheus.

This package translates and maps metric names, units, and labels between the OpenTelemetry and Prometheus conventions. This translation allows sending OTLP metrics to Prometheus using an OpenTelemetry collector. But the native support for ingesting OTLP metrics was absent in Prometheus.

Native support for OpenTelemetry metrics in Prometheus

Send metrics to Prometheus via Otel Collector
Send metrics to Prometheus via Otel Collector.

Recently a pull request was merged in the Prometheus codebase, which adds support for ingesting OpenTelmetry metrics using a new OTLP-compatible ingestion endpoint.

A new feature flag otlp-write-receiver has been added, enabling the feature for natively ingesting OpenTelemetry metrics.

The OpenTelemetry metrics can be sent on /otlp/v1/metrics the endpoint and ingested natively.

This unlocks an alternative strategy to push the O

This change is still experimental, and before the final release, a lot of documentation updates will also happen; I will update this post with the changes and add the final Prometheus release version in which this change will be present!



from Hacker News https://ift.tt/tysp80U

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.