How OpenTelemetry metrics reach long-term Prometheus storage
If your Collector already emits metrics and a local Prometheus holds them for only a few weeks, you need a storage layer built for retention. Start from one fact: OpenTelemetry is not an observability backend. The Collector receives, processes and exports metrics, but something else must store and query them. Prometheus local storage is a single-node time series database with a default retention of 15 days, configurable by time or size, and the Prometheus storage documentation says it is not clustered or replicated. Keeping months or years of metrics therefore means adding a separate system. This page covers two self-hosted options: Grafana Mimir and Thanos.
Mimir fits when you want a central, horizontally scalable, multi-tenant store that Prometheus or the Collector writes into directly, and when several teams need isolated tenants with their own limits. Its architecture is a set of components in one binary, and it has a Kafka-based ingest path as the preferred architecture from Mimir 3.0. Thanos fits when you already run several Prometheus servers that need one global query view, deduplication of HA pairs and object storage retention with minimal change to existing Prometheus deployments. Its components can be added on top of what you have. Neither choice is the right answer for every environment, so confirm the ingest volume, tenancy model, object storage options and the team's Kubernetes and operations experience before committing.
The choice also determines how OTLP metrics arrive. Prometheus and Mimir expect Prometheus-style series, so Collector metrics pass through conversion, and some OTLP metric types need attention before they land cleanly. Decide early whether metrics go through remote write from a Prometheus instance, through an OTLP path into Mimir, or through Thanos Receive, because each path changes the authentication, tenant identification and failure handling you must build. Verify the exact version and endpoint for your chosen path against its current documentation before you write the Collector configuration.
Remote write, native OTLP or Thanos sidecar: which path fits
This table compares four ways Collector metrics can reach long-term Prometheus-compatible storage, across tenancy, the existing Prometheus footprint, operational load and migration work. Read each row as a question to answer for your environment, and treat the last row as the main takeaway: the path with the most migration work is usually the one that changes how existing Prometheus is run.
| Path | What it fits best | Operational load | Migration work |
|---|---|---|---|
| Prometheus remote write into Mimir | Teams already running Prometheus that want Mimir as central multi-tenant storage | Prometheus stays in place as a scraper and forwarder, and Mimir adds its own components to run | Moderate: add remote write to existing Prometheus and route tenant headers |
| Collector OTLP into Mimir | Teams starting with the Collector that want metrics without Prometheus scraping in the path | Collector and Mimir are run, with no Prometheus server required for these metrics | Moderate to high: change instrumentation export and confirm metric naming and type conversion |
| Thanos Receive via remote write | Teams that want Prometheus-style push with Thanos query and object storage | Thanos components (Receive, Query, Store, Compact) must be run as a distributed system | Moderate: Prometheus remote write config and THANOS-TENANT header handling |
| Prometheus with Thanos sidecar | Teams with many existing Prometheus servers that need a global query view and unlimited retention | Sidecar on each Prometheus, plus Query, Store and a singleton Compact per bucket | Lowest for existing Prometheus, but local compaction settings must be changed |
| Tenancy model | Mimir requires a tenant ID header on every request and leaves authentication to a reverse proxy | Thanos Receive identifies tenants with the THANOS-TENANT header by default | Confirm how each team's data is isolated before choosing a path |
| Existing Prometheus footprint | Sidecar and remote write keep current Prometheus servers and alert rules in use | OTLP-only paths may need alert rules and dashboards rewritten for the new metric names | Inventory existing scrape jobs, recording rules and alerts first |
| Metric type conversion | Confirm which OTLP metric types need conversion before Prometheus-compatible storage | Histograms, sums and gauges can map differently depending on the path and settings | Test with representative metrics in a non-production environment |
| Most migration work | OTLP ingestion into Mimir or Prometheus when dashboards and alerts depend on existing scrape names | Changes affect instrumentation, naming and alerting, not only storage | Plan a parallel run and compare results before cutover |
How each architecture moves data
Mimir is a horizontally scalable, multi-tenant store for Prometheus-compatible metrics. Prometheus or a Collector writes through the remote write API to the distributor, which validates and routes samples. Queries go to the query frontend, which splits and caches them before they reach the queriers. Each tenant's series are kept in their own Prometheus TSDB in object storage, so the object store is a planned dependency rather than an afterthought.
- Distributor: receives remote write requests and forwards samples to the ingest path. Confirm the tenant ID header that your senders attach, since Mimir requires it on every HTTP request.
- Ingest path: choose between the classic architecture, with stateful ingesters that keep local write-ahead logs, and the ingest storage architecture, which uses Kafka as a central pipeline. The architecture docs say the ingest storage option is the preferred one from Mimir 3.0, so check which one your version and team support.
- Query frontend and queriers: serve PromQL reads. Plan the query path separately from ingest when you size capacity.
- Object storage: Amazon S3, Google Cloud Storage, Microsoft Azure Storage, OpenStack Swift or a local filesystem (single node only). Choose one that your data centre or cloud account already operates.
- Authentication: Mimir leaves authentication and authorization to an external reverse proxy, so that proxy is part of what you must build.
Confirm how many components each target mode needs with the Mimir documentation for your release, and check whether the mimir-distributed Helm chart fits your Kubernetes platform.
Thanos Receive implements the Prometheus Remote Write API, so it fits setups where Prometheus or a Collector pushes metrics rather than having Thanos read the local TSDB. Received samples are held locally and uploaded to object storage as TSDB blocks every 2 hours by default. Tenants are identified by the THANOS-TENANT header unless you change that setting, which means tenant isolation depends on the senders setting the header correctly.
- Remote write endpoint: point the sender at the Receive router endpoint. Test that the header is set on every request from each sending team.
- Local storage: Receive keeps recent data on disk before upload, so provision persistent volumes sized by your retention goals and the upload interval.
- Block uploads: blocks reach object storage every 2 hours by default. Ask your team how that interval affects query freshness for data that has not yet been uploaded.
- Object storage: the bucket must be reachable from every Receive instance, and the Compactor must run as a singleton against each bucket.
- Query layer: Thanos Query federates Receive with other stores so users see a single view.
Confirm the header name and tenancy settings with the Thanos Receive documentation for the release you deploy, and test a tenant boundary before you let teams write to it.
The Thanos sidecar runs next to an existing Prometheus server and adds long-term storage without changing how Prometheus scrapes or receives data. It implements the Thanos Store API on top of the Prometheus remote-read API, and it uploads TSDB blocks to object storage as Prometheus produces them, every 2 hours. This design keeps the Prometheus server as the write path, so the reader's Prometheus instances stay the source of truth for ingestion.
- Sidecar placement: one sidecar per Prometheus instance, deployed alongside it with access to its data directory.
- Block duration: set the Prometheus min and max block duration to equal values. The sidecar docs say this disables local compaction, and that without it uploaded data can be corrupted.
- Store gateway: serves historical blocks from object storage to Thanos Query.
- Compactor: downsamples raw data older than 40 hours to 5-minute resolution and 5-minute data older than 10 days to 1-hour resolution. It must run as a singleton per bucket.
- Local retention: Prometheus still keeps local data, so decide how long it stays on disk after upload.
Before rollout, confirm the Prometheus version you run meets the minimum in the Thanos getting started guide and that every Prometheus instance has persistent disk.
Where the Collector, Prometheus, Mimir and Thanos components sit
The diagram starts with applications sending OTLP metrics to a Collector gateway. The gateway hands metrics to one of two paths: remote write into the Mimir distributor, or remote write into Thanos Receive. A parallel path runs through Prometheus with a Thanos sidecar, which uploads TSDB blocks to object storage. The trust boundary sits around the authenticating reverse proxy, because Mimir expects a tenant ID header on every request and leaves authentication to that proxy. Check which tenant identity each path carries before you choose one.
Collector metrics reach Mimir or Thanos, with Prometheus and the sidecar as a separate path.
Which OTLP metric types need conversion before they are stored
Every OTLP metric type has to be translated before Prometheus remote write can store it, because remote write carries Prometheus samples, not OpenTelemetry data points. The conversion is performed by the Collector's prometheusremotewrite exporter, so the mapping decision sits in the Collector configuration rather than in Mimir or Thanos. Before you commit to a design, list the metric types your applications emit (sums, gauges, histograms, exponential histograms and summaries) and check how the exporter handles each one in the version you plan to deploy. The supplied research does not cover the exporter's conversion rules, so confirm them against the exporter README in the OpenTelemetry Collector Contrib repository and the documentation for your target before relying on any mapping.
Cumulative and delta sums deserve the first check. Prometheus counters are cumulative, so a delta temporality sum must either be converted to cumulative within the pipeline or rejected, and the behavior differs by exporter version. Histograms and exponential histograms are the other high-risk group, because a single OTLP histogram becomes a set of series (buckets, sum and count), and exponential histograms have no direct Prometheus equivalent, so confirm whether the exporter converts them to classic buckets, drops them or fails. Summaries and gauges are usually simpler, but confirm how quantile values and gauge names are written. Ask your own team to run a test workload that emits each metric type and query the result in Mimir or Thanos, since the stored series names and label sets are what your dashboards and alert rules will depend on.
Resource attributes also change shape during conversion. The exporter turns resource attributes such as service.name and service.namespace into labels on each series, so high-cardinality resource values like pod or instance identifiers can multiply active series in Mimir. Review which resource attributes you keep, use the Collector's processors to remove or rename them before export, and confirm the label naming rules for dotted OpenTelemetry names, since Prometheus label names cannot contain dots. Write the expected series names and labels for each metric type into your design document, and treat any mismatch found in the test as a blocker for production rollout.
Set up the Collector to write metrics to Mimir
This sequence takes a Collector from a chosen Mimir target to a verified metrics path, with tenant isolation, encrypted transport and credentials in place before any production traffic is sent. The result is a gateway Collector that writes OTLP metrics into Mimir and a query that proves the data can be read back through the query frontend.
Confirm the Mimir target and ingest architecture
Your team confirms whether Mimir will run as a monolithic deployment or as the distributed chart, and which ingest architecture the deployment uses, since the classic and Kafka-based ingest designs differ in what sits between the distributor and storage. Record the distributor endpoint that will receive writes and the query frontend endpoint that will serve reads. Check that the target is reachable from the subnet where the gateway Collector will run. The step is done when the team has written down both endpoints and the ingest design, and a network test from the gateway host reaches each one over the agreed port.
Provision object storage and tenant IDs
Platform engineering creates the object storage bucket or buckets for Mimir in one of the supported backends, such as Amazon S3, Google Cloud Storage, Azure Storage, OpenStack Swift or, for a single node only, a local filesystem. Decide the tenant IDs that map to teams or business units, because Mimir requires a tenant ID header on every HTTP request and stores each tenant's series in its own TSDB. Confirm retention and access policies with the storage owner before data arrives. The step is done when the bucket exists, the tenant list is approved, and a test object can be written and read by the Mimir service account.
Build a minimal Collector with the Collector Builder
The engineer who owns the pipeline writes a builder manifest that lists only the receivers, processors, exporters and extensions the metrics path needs, such as OTLP receive, the batch and memory limiter processors, the Prometheus remote write exporter or OTLP HTTP exporter for Mimir, and the authenticator extension chosen in the next step. The builder produces a custom binary, which keeps the attack surface small in line with OpenTelemetry's guidance to build only what you need. Record the build version and checksum. The step is done when the binary starts with the configuration file and lists only the intended components in its startup output.
Configure TLS, tenant headers and credentials on the exporter
The engineer configures the exporter with the Mimir write endpoint over TLS, sets the tenant ID header for each pipeline, and adds credentials with either the oauth2client extension, if your identity provider issues tokens, or basic authentication if the reverse proxy in front of Mimir accepts it. Store the client secret or password in your secrets manager and reference it from the configuration rather than writing it into the file. Confirm with the security team which certificate authority signs the Mimir endpoint. The step is done when the Collector connects to the proxy with a valid certificate and a test request returns success rather than an authentication or certificate error.
Run the Collector in gateway mode
Platform engineering deploys the custom Collector as a gateway, a central service that accepts OTLP metrics from many applications or agents and forwards them to Mimir. Bind the OTLP receiver to an address that the intended senders can reach, and restrict access to it with network policy or authentication, since server components on recent Collector versions bind to localhost by default and must be opened deliberately. Enable the Collector's own internal telemetry so its health can be watched. The step is done when the gateway is running, its health endpoint responds, and logs show the exporter started without dropped batches.
Send a test series through the pipeline
The engineer sends a single known metric, for example a gauge with a unique name and a test label, from a sample application or an OTLP test tool to the gateway. Watch the Collector's exporter metrics to confirm samples were accepted and sent, and check the Mimir distributor logs for rejected samples, which often point to tenant header or limit problems. Note that OTLP metric types such as histograms and exponential histograms may need conversion or a different write path, so confirm the type behavior before sending production types. The step is done when the test series is accepted and the exporter reports zero failed sends for that run.
Verify with a PromQL query through the query frontend
The engineer runs a PromQL query for the test series against the query frontend endpoint, using the same tenant ID that the Collector wrote with. Mimir sends PromQL queries to the query frontend, so a result here shows that the write path and the read path both work for that tenant. Repeat the query with a different tenant ID to confirm that the data is isolated. The step is done when the query returns the test series with the expected labels and values, and the cross-tenant query returns no data for that series.
Securing TLS, authentication and tenant isolation
Remote write and native OTLP both move metrics across a network boundary and into a multi-tenant store, so each hop needs its own control. The cards below cover the Collector itself, the exporter and receiver connections, and the tenant boundary inside Mimir, which the Collector cannot provide on its own.
Store Collector configuration securely
The Collector configuration often holds exporter credentials, bearer tokens and TLS key paths, so it should not sit in plain text in a repository or a world-readable directory. Keep secrets in your secrets manager or environment-injected files, restrict read access to the Collector's service account, and check that rendered configuration is never written to logs during startup or debugging. Confirm this with a review of every file and environment variable the Collector process can read.
Collector security practicesEncrypt exporter traffic to storage
Samples sent with remote write or OTLP carry metric names, labels and resource attributes that often identify hosts, services and customers. Configure TLS on the exporter so traffic to the Mimir distributor or the Thanos Receive endpoint is encrypted in transit, and verify the server certificate rather than disabling verification. Confirm with your security team which certificate authority, certificate lifetimes and rotation process apply to each endpoint.
Authenticate receiver connections
If the Collector accepts OTLP from applications or other Collectors, authenticator extensions can check incoming credentials, for example with OIDC, before data enters the pipeline. On the outgoing side, the oauth2client extension can add credentials to exporter requests when the back end expects them. Decide which clients may send data, how each one authenticates, and what happens when a token expires.
Collector configuration docsMimir leaves authentication to a proxy
Mimir requires a tenant ID header on every HTTP request, but it does not authenticate callers itself. Put an authenticating reverse proxy in front of the distributor so that only authorized clients can write, and so that the proxy, not the client, decides which tenant ID a caller may use. Without this, any client that can reach the endpoint can write into any tenant. Confirm the header handling and tenant mapping in your proxy configuration during design review.
Mimir architecture docsCheck the localhost binding default
Since Collector v0.110.0, server components bind to localhost by default rather than 0.0.0.0. Upgrades from older versions, or configurations that set explicit listen addresses, can still expose receivers on every interface. Review each receiver's endpoint setting after every upgrade, and confirm that only the intended network interfaces accept traffic to the Collector.
Redact sensitive attributes
Metric labels and resource attributes can carry user identifiers, email addresses or internal hostnames that a long-term store will keep for the whole retention period. Use the redaction processor to remove or mask sensitive attributes before export, and build the Collector with only the components the pipeline needs. Test the processor against sample data from each source, because a label missed at this stage is hard to remove from stored series later.
Redaction and build guidanceQuestions teams ask before building this pipeline
Should I use Prometheus remote write or OTLP to send metrics to Mimir?
Remote write is the path Mimir's architecture describes: Prometheus sends samples to the distributor through the remote write API, and PromQL queries go to the query frontend. Choose it when you want Mimir to receive the same Prometheus-style series your existing alerts and dashboards already use. Before you commit to OTLP ingestion, confirm in the Mimir documentation for your version whether it is supported and how it is configured. On the Collector side, confirm whether the distribution you build includes a remote write exporter and how that exporter converts the OTLP metric types covered later on this page. Teams with many existing Prometheus rules usually find remote write the smaller change to make first.
What drives the cost of running Mimir or Thanos for metrics?
Prometheus is licensed under Apache-2.0 and has no paid enterprise edition, so its cost is infrastructure, storage, implementation and the people who run it. Mimir is distributed under AGPL-3.0-only and Thanos under Apache-2.0, so have your legal team review licensing terms before you choose. The main cost drivers are compute for the write and query tiers, object storage that grows with retention and series count, and the design and migration work. Recurring costs include storage growth, upgrades and on-call time. One-time costs include design, build and migration. When you request a quote, ask for the components in scope, the object storage sizing assumptions, the tenant count, the retention period, the high availability layout and the support hours included.
How long does a migration from Thanos or Prometheus to Mimir take?
The duration depends on data volume, the number of tenants, how much history must move, and how many dashboards and rules must be repointed. Confirm these inputs before you plan a schedule, because the supplied sources do not give a general duration. Mimir's documentation includes a guide for migrating data from Thanos or Prometheus, which is the natural starting point for the plan. A typical sequence inventories existing series and rules, runs both paths in parallel, cuts over remote write, decides whether to backfill history, and then switches queries. If you keep Thanos Sidecar during the move, set Prometheus min and max block duration to equal values, since otherwise local compaction can corrupt uploaded data. Ask for a fixed-scope plan with written milestones.
Can our own team build and run Mimir or Thanos in-house?
Yes, if your team already runs Kubernetes, object storage and Prometheus in production and can staff on-call for a distributed system. Thanos's getting started guide says it is built to run as a distributed system and is not recommended for production on a single node. Mimir can run as microservices or in monolithic mode, and the mimir-distributed Helm chart handles installation and upgrades on Kubernetes. The skills most teams lack are object storage tuning, tenant authentication, and Kafka operations if you choose the ingest storage architecture. Mimir requires a tenant ID header on every request and leaves authentication to an external reverse proxy, so someone must own that layer. Write down the runbooks and named owners before the first production cutover.
What does the work need from our team before it starts?
Your team supplies the infrastructure, the access and the decisions that the design depends on. The main inputs are listed below.
- An object storage bucket. Mimir supports Amazon S3, Google Cloud Storage, Microsoft Azure Storage, OpenStack Swift and a local filesystem, the last for single-node setups only.
- A tenant plan that maps teams or business units to tenant IDs, because every request carries that header.
- A Kubernetes cluster for the mimir-distributed Helm chart, or hosts for monolithic mode.
- Prometheus or Collector sources with persistent disk and network paths to the write endpoint.
- An authentication model at the reverse proxy, with named owners for alerts and on-call.
Confirm each item against the version you plan to run before the design is locked.
How do TLS and authentication work between the Collector and Mimir?
Mimir does not handle authentication itself, so the authentication layer sits in a reverse proxy in front of it. On the Collector side, authenticator extensions can authenticate incoming connections on receivers, for example with OIDC, and the oauth2client extension can add credentials to outgoing exporter requests. Store Collector configuration securely, encrypt traffic and use the redaction processor to remove sensitive attributes before they leave the pipeline. Since Collector v0.110.0, server components bind to localhost by default, so set bind addresses deliberately for any receiver that other systems must reach. Check the TLS and credential keys in the exporter and extension documentation for your Collector version, and test a failed-credential case before go-live.
Which OTLP metric types need conversion before Mimir stores them?
The conversion rules depend on the exporter and the Mimir ingestion path, and the supplied sources do not publish a full type-by-type mapping, so confirm it with the exporter documentation for your build. In general, OTLP defines several metric types, including sums, gauges, histograms, exponential histograms and summaries, and the Prometheus data model does not map every one of them directly. Those differences can change metric names, label sets and histogram bucket layouts, which then affect PromQL queries and alert rules. Test each metric type you emit end to end with a canary series, then check names, labels and query results in Mimir. Record the results so later upgrades can be compared against them.
Limits to confirm in your environment
The supplied sources describe what Mimir and Thanos can do, but several limits depend on vendor testing, license terms, release windows and the exact Collector version you run. Each card below is a point to confirm before you choose a storage path, so the design rests on your own environment rather than on published claims.
Mimir scale figure is a vendor test
The Mimir README says internal testing handled up to 1 billion active time series, but that is Grafana Labs' test, not a guarantee for your workload. Active series count depends on label cardinality, scrape intervals and tenant layout, which the Collector pipeline shapes directly. Ask for a load test on your own label set and estimate active series from your current Prometheus head before sizing.
Mimir repositoryAGPL license review for Mimir
Grafana Mimir is distributed under AGPL-3.0-only, a copyleft license with network-use obligations that differs from the Apache-2.0 licenses of Prometheus, Thanos and the Collector. Have legal and procurement confirm how your organization treats AGPL software, especially if you modify Mimir or offer it as a service to others. Decide this before the storage design is committed.
Mimir repositoryThanos compactor singleton constraint
The Thanos compactor must run as a singleton against each object storage bucket, and it downsamples data on a schedule. Running two compactors against one bucket is a failure mode your deployment must prevent, for example through a single replica, orchestration rules or bucket separation. Confirm how your platform enforces this and how a restart or failed node is handled.
Thanos compactor docsSingle-node Thanos is not production
The Thanos getting started guide says Thanos is built to run as a distributed system and is not recommended for production on a single node. Plan for several components across hosts or nodes, and treat a one-machine test as a proof of concept only. Confirm that your platform team can run the sidecar, query, store and compactor pieces with their own availability targets.
Thanos getting startedPrometheus version and LTS window
Prometheus minor releases generally stop receiving bug fixes after six weeks, so choosing a non-LTS line means regular upgrades. The current LTS line is 3.13, supported until July 31, 2027, which gives a longer patch window. Confirm which line your Prometheus servers, sidecars and remote write senders run, and set an upgrade calendar that matches it.
Prometheus release cycleExporter maturity and metric conversion
Which OTLP metric types convert cleanly for remote write or native OTLP ingest, and how resource attributes become labels, can change between Collector releases. Test each metric type your applications emit, including histograms and counters, against the Collector release you plan to run, such as v0.163.0 or a later build. Check the component README for stability levels before you rely on a given exporter path.
Collector releasesHow DeployOpen scopes and delivers this pipeline
DeployOpen starts every engagement with a written, fixed scope that settles the architecture before any configuration is written. For this pipeline, that scope names the target (Mimir, Thanos or a remote write endpoint in your own infrastructure), the metric types the Collector will send, the tenancy model, the TLS and authentication design for each hop, and the test and handover criteria. Decisions such as whether Prometheus remote write or native OTLP is used, how histogram and summary data is converted, and how tenant IDs are assigned are recorded in the scope so your security and platform teams can review them before work starts. DeployOpen implements and documents the work inside your cloud accounts, data centers or air-gapped networks, so the configuration, certificates and credentials stay under your control.
Delivery follows the scope. DeployOpen builds the Collector with only the components this pipeline needs, sets authentication on the receivers and exporters, and tests the path end to end: series arriving with the expected labels, tenant isolation holding under a second tenant, TLS verification failing when it should, and restarts not losing data within the agreed limits. The handover package covers the configuration files, runbooks for certificate rotation and tenant onboarding, and the test results, so your own team can operate the pipeline without DeployOpen staff on call. Ask each vendor for a written quote that lists the exact components, environments and test cases it covers, and confirm which of them your team will own after handover.
Upgrades and ongoing support are handled through a retainer rather than folded into the build price. Collector, Mimir or Thanos, and Prometheus releases change at different cadences, so a retainer covers planned version moves, retesting after each one, and response to security fixes in the components this pipeline depends on. DeployOpen does not publish a price list. A quote follows from the written scope, and the scope is where you decide how much of the upgrade and support work you want to buy and how much your team will keep in-house.

