Integrations
Integration

Send Prometheus metrics to Sazabi through the OpenTelemetry Collector

By Sazabi Team

Last verified on Nov 8, 2026.

Prometheus tells you how a system behaves over time. Counters grow, gauges rise and fall, and histograms record how long things took. Sazabi, the AI-native observability and security platform, takes those numbers in so the agent can read them next to the logs from the same incident.

What Sazabi reads from Prometheus

Prometheus does not speak OTLP, so the OpenTelemetry Collector sits in the middle. Its prometheus receiver scrapes a Prometheus server, and an otlphttp/sazabi exporter forwards the result to your intake. You need the Contrib build of the Collector, because the Core build has no prometheus receiver. The exporter takes metrics_endpoint, which must be the full URL ending in /v1/metrics.

Each scraped data point becomes a log record with structured fields for the metric name, type and value. Labels stay as record attributes. Histograms and summaries add count, sum, min and max. Sazabi ingests OpenTelemetry metrics (Prometheus metrics through an OpenTelemetry Collector) and OTLP traces through the same intake as your logs. It stores each metric data point and each span as a log record that its agent queries alongside your logs, so there is no separate metrics store to run.

Questions it answers

  • Did request volume or error counts change at the minute the incident started?
  • Which label values, such as code="500", account for a jump in a counter?
  • Does a gauge for queue depth or memory move before the first error log?
  • What was the slowest histogram bucket for this service during the deploy?
  • Are metrics arriving at all, or did the scrape job stop?

A worked example: a counter and a histogram

The Sazabi example scrapes the Prometheus server at localhost:9090, and that endpoint returns Prometheus's own metrics. To forward an application's series, add the application's /metrics target to the receiver's scrape_configs, the same static_configs block the example uses; the receiver takes standard Prometheus scrape configuration. Prometheus documents a text exposition format. A scrape of that application might return lines like these:

# TYPE http_requests_total counter
http_requests_total{method="post",code="200"} 1027
http_requests_total{method="post",code="500"} 41
# TYPE http_request_duration_seconds histogram
http_request_duration_seconds_bucket{le="0.05"} 24054
http_request_duration_seconds_bucket{le="0.1"} 33444
http_request_duration_seconds_bucket{le="+Inf"} 144320

A counter can only increase or reset to zero on restart, so a single value tells you little. What matters is the change between two scrapes. With the Collector's scrape_interval set to 30s, as in the Sazabi example, you get a data point every half minute, and each one lands as its own record. The code and method labels are attributes you can filter on.

Search for the metric by name, then ask the agent to compare:

Compare http_requests_total with code="500" across the last ten scrapes.
Did the count jump, and which logs from checkout-api were written in that window?

A drop to a lower value means the process restarted and the counter reset, so do not read it as a recovery. A steady climb in the 500 series with no matching log line points to a service that is failing without logging, and that is the next place to look. If nothing shows up, check that targets in the receiver points at the right Prometheus host and port, and that the endpoint ends in /v1/metrics.

How it fits with other integrations

Prometheus is a source of numbers, and the Collector is the same one described on the OpenTelemetry page. If you use Grafana Cloud for dashboards over Prometheus, the Grafana integration lets the Sazabi agent query it directly. For log forwarders on the same hosts, see Vector and Fluent Bit. Browse telemetry pipelines for more.

Log sources

  • Prometheus (manual log source, observability tools): Run an OpenTelemetry Collector with a prometheus receiver and otlphttp exporter to forward Prometheus metrics to Sazabi as searchable log records.

What Sazabi detects from these logs today

These detections are on for every production project, with no monitors or alert rules to write. Sazabi opens an issue when one fires.

  • Novel event: A kind of error that has never appeared before.
  • Client errors: JavaScript exceptions, failed fetches and hydration errors.

Frequently Asked Questions

Why does this need an OpenTelemetry Collector?

Prometheus does not speak OTLP natively. The Collector's prometheus receiver scrapes Prometheus targets and forwards the data to Sazabi over OTLP/HTTP. The Sazabi example points it at the Prometheus server itself; list your application targets to forward their series too.

Which Collector distribution do I need?

The Contrib distribution. The Core distribution does not include the prometheus receiver, and you will see an unknown receiver type: prometheus error if you use it.

What happens to Prometheus labels?

Labels are preserved as record attributes on each data point. Histograms and summaries also include count, sum, min and max.

Is this a time series database?

No. Sazabi stores each scraped data point as a searchable log record next to your logs and traces. Keep Prometheus itself for long-range storage and PromQL.

Sources

  1. Collector Contrib prometheus receiver and otlphttp exporter, each data point becomes a record, labels kept as attributes, histograms and summaries include count, sum, min and max, metrics_endpoint ending in /v1/metrics (accessed Nov 8, 2026)
  2. Prometheus has one connection method: a manual log source (accessed Nov 8, 2026)
  3. Four core metric types: counter, gauge, histogram and summary; a counter only increases or resets to zero (accessed Nov 8, 2026)
  4. Text exposition format: # TYPE lines, labels in braces, histogram _bucket series with le labels, summary quantile labels (accessed Nov 8, 2026)
  5. scrape_interval and scrape_timeout settings in scrape_configs (accessed Nov 8, 2026)