<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/how-to-convert-prometheus-histograms-to-otlp-with-the-opentelemetry-collector-eeyizafgb" -->

---
title: How to Convert Prometheus Histograms to OTLP with the...
description: A step-by-step guide walks through converting Prometheus histogram metrics into the OpenTelemetry OTLP format using the OpenTelemetry Collector. Using a sample...
canonical: https://daily.dev/posts/how-to-convert-prometheus-histograms-to-otlp-with-the-opentelemetry-collector-eeyizafgb
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: How to Convert Prometheus Histograms to OTLP with the OpenTelemetry Collector | daily.dev
og:description: A step-by-step guide walks through converting Prometheus histogram metrics into the OpenTelemetry OTLP format using the OpenTelemetry Collector. Using a sample...
og:url: https://daily.dev/posts/how-to-convert-prometheus-histograms-to-otlp-with-the-opentelemetry-collector-eeyizafgb
og:image: https://api.daily.dev/og/posts/EeyIZaFgb.png
og:image:alt: How to Convert Prometheus Histograms to OTLP with the OpenTelemetry Collector
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# How to Convert Prometheus Histograms to OTLP with the OpenTelemetry Collector

**[freeCodeCamp](https://daily.dev/sources/freecodecamp)** · 9 min read · 1 upvotes · 0 comments

## Summary

A step-by-step guide walks through converting Prometheus histogram metrics into the OpenTelemetry OTLP format using the OpenTelemetry Collector. Using a sample FastAPI payment application exposing a payment_transaction_duration_seconds histogram, it covers configuring the Prometheus receiver to scrape metrics, how the Collector maps Prometheus _bucket/_sum/_count series into the OpenTelemetry Histogram data model, setting up the OTLP exporter with TLS, wiring the full pipeline, and verifying delivery to SigNoz Cloud with troubleshooting tips.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.freecodecamp.org/news/how-to-convert-prometheus-histogramsotlp-with-the-opentelemetry-collector>

## Questions this post answers

### How does the OpenTelemetry Collector convert Prometheus histogram metrics into OTLP format?

The Prometheus receiver scrapes the _bucket, _sum, and _count time series that Prometheus exposes for a histogram metric and maps them into a single OpenTelemetry Histogram data model containing the count, sum, explicit bucket boundaries, and bucket counts. This unified structure is then exported to an OTLP-compatible backend via the OTLP exporter, preserving the distribution data needed to calculate percentiles and analyze latency.

_See how daily.dev surfaces practical guides for teams standardizing metrics pipelines on OTLP._

### What Prometheus receiver configuration is needed in the OpenTelemetry Collector to scrape a /metrics endpoint?

A minimal Prometheus receiver config sets scrape_configs with a job_name, scrape_interval (such as 15s), and static_configs listing the target host and port, for example targets: ["payment-api:8080"]. The scrape_interval controls how often the endpoint is polled, and job_name groups the resulting metrics logically once they reach the backend.

_Developers wiring up Collector pipelines can find configuration walkthroughs like this via daily.dev._

## Similar posts on daily.dev

- [How Prometheus Exporters Work With OpenTelemetry](https://daily.dev/posts/how-prometheus-exporters-work-with-opentelemetry-hxjdcu2qr) · Last9 · 4 upvotes · 0 comments
- [Dual-exporting .NET metrics with OTLP and Prometheus](https://daily.dev/posts/dual-exporting-net-metrics-with-otlp-and-prometheus-bnnpqjfa6) · OpenTelemetry · 1 upvotes · 0 comments
- [Prometheus and OpenTelemetry finally play nice](https://daily.dev/posts/prometheus-and-opentelemetry-finally-play-nice-2lupjc8qw) · The New Stack · 0 upvotes · 0 comments
- [OpenTelemetry: OTel Collectors in Kubernetes and VictoriaMetrics Stack integration](https://daily.dev/posts/opentelemetry-otel-collectors-in-kubernetes-and-victoriametrics-stack-integration-rv0ruemf6) · ITNEXT · 3 upvotes · 0 comments

---

Tags: [#observability](https://daily.dev/tags/observability), [#opentelemetry](https://daily.dev/tags/opentelemetry), [#prometheus](https://daily.dev/tags/prometheus), [#fastapi](https://daily.dev/tags/fastapi)

[View this post on daily.dev](https://daily.dev/posts/how-to-convert-prometheus-histograms-to-otlp-with-the-opentelemetry-collector-eeyizafgb)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"How to Convert Prometheus Histograms to OTLP with the OpenTelemetry Collector","url":"https://daily.dev/posts/how-to-convert-prometheus-histograms-to-otlp-with-the-opentelemetry-collector-eeyizafgb","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/how-to-convert-prometheus-histograms-to-otlp-with-the-opentelemetry-collector-eeyizafgb"},"datePublished":"2026-08-24T16:57:17.965Z","dateModified":"2026-09-13T20:10:34.453Z","description":"A step-by-step guide walks through converting Prometheus histogram metrics into the OpenTelemetry OTLP format using the OpenTelemetry Collector. Using a sample...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/91c09f219070635beffc52e59d9b54b4?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/91c09f219070635beffc52e59d9b54b4?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"freeCodeCamp","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"freeCodeCamp","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1628412854/logos/freecodecamp","url":"https://daily.dev/sources/freecodecamp"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/how-to-convert-prometheus-histograms-to-otlp-with-the-opentelemetry-collector-eeyizafgb","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":1},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"observability,opentelemetry,prometheus,fastapi","timeRequired":"PT9M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"freeCodeCamp","item":"https://daily.dev/sources/freecodecamp"},{"@type":"ListItem","position":3,"name":"How to Convert Prometheus Histograms to OTLP with the OpenTelemetry Collector"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/how-to-convert-prometheus-histograms-to-otlp-with-the-opentelemetry-collector-eeyizafgb#faq","mainEntity":[{"@type":"Question","name":"How does the OpenTelemetry Collector convert Prometheus histogram metrics into OTLP format?","acceptedAnswer":{"@type":"Answer","text":"The Prometheus receiver scrapes the _bucket, _sum, and _count time series that Prometheus exposes for a histogram metric and maps them into a single OpenTelemetry Histogram data model containing the count, sum, explicit bucket boundaries, and bucket counts. This unified structure is then exported to an OTLP-compatible backend via the OTLP exporter, preserving the distribution data needed to calculate percentiles and analyze latency. See how daily.dev surfaces practical guides for teams standardizing metrics pipelines on OTLP."}},{"@type":"Question","name":"What Prometheus receiver configuration is needed in the OpenTelemetry Collector to scrape a /metrics endpoint?","acceptedAnswer":{"@type":"Answer","text":"A minimal Prometheus receiver config sets scrape_configs with a job_name, scrape_interval (such as 15s), and static_configs listing the target host and port, for example targets: [\"payment-api:8080\"]. The scrape_interval controls how often the endpoint is polled, and job_name groups the resulting metrics logically once they reach the backend. Developers wiring up Collector pipelines can find configuration walkthroughs like this via daily.dev."}}]}
```

