Collect Prometheus metrics using OpenTelemetry collector
The OpenTelemetry Collector can be configured to scrape Prometheus metrics, effectively acting as a drop-in replacement for the Prometheus server. This integration allows for a seamless transition from Prometheus to OpenTelemetry, enabling users to leverage both systems' strengths.
Many Kubernetes services and pods expose metrics through a Prometheus endpoint that you can scrape. We recommend to scrape and forward these metrics via an OpenTelemetry Collector.
To make your services scrapeable, add these annotations to your pod or service definitions
The following code snippet shows an OpenTelemetry Collector configuration file.
Learn how to deploy the collector within our OpenTelemetry collector integration documentation.