Storing OpenTelemetry traces in Grafana Tempo for infrastructure you control
If your applications already send traces through the OpenTelemetry Collector and you need a self-hosted place to store and query them from Grafana, Grafana Tempo is an open source, high-volume distributed tracing back end that receives OTLP traces and is queried in Grafana. OpenTelemetry generates, exports and collects telemetry but does not store it, so choosing Tempo is a separate decision from building your pipeline. Treat it as a back end choice you can revisit, with its own sizing, retention and access model. Before you commit, review the licensing question. On April 20, 2021, Grafana Labs relicensed Grafana, Loki and Tempo from Apache License 2.0 to AGPLv3, while plugins, SDKs and agent software kept other licenses, and Grafana Enterprise is offered as a non-AGPL commercial option. Have your legal team confirm whether AGPLv3 terms fit how you plan to run and modify the software, and check the current terms on the Grafana Labs licensing page.
The decision also shapes the rest of the stack. Tempo stores trace data in object storage, so you need to choose the bucket platform, its durability model and its access controls before ingestion goes live. Grafana is the query and visualization layer, so the Grafana deployment, its database and its authentication settings become part of the same review. Grafana's own guidance says SQLite does not scale for production, so a production Grafana backed by MySQL or PostgreSQL, with high availability if you need it, is a planning item of its own. Ask your team to confirm which Grafana release line you will standardize on, since Grafana publishes minor releases roughly every other month and supports each minor release for 9 months. Confirm these points with the Tempo and Grafana documentation for your target versions rather than relying on older guides.
Your first working step is small and checkable: point one non-production Collector exporter at a test Tempo instance, confirm that traces arrive, and open one in Grafana. Then decide how you will link traces to Loki logs and Prometheus metrics, since those links depend on consistent resource attributes and trace identifiers in your telemetry. Plan the rollout around three questions: who can query traces and under what identity, how long traces must be retained, and how you will test restores and upgrades. Answer these before the first production trace arrives, because they determine the object storage layout, the Grafana data source configuration and the evidence your security team will ask for later.
How traces move from applications to Tempo and Grafana
The path starts in instrumented applications, which send OTLP traces to a Collector running as an agent beside services or as a gateway for many sources. The Collector exports to Tempo, and Tempo writes trace blocks to object storage. Grafana queries Tempo and, alongside it, Loki logs and Prometheus metrics, so trace views can link to related logs and metrics. Check the Collector endpoints and the bucket as the two places where the trust boundary must be enforced, since both receive or hold sensitive telemetry.
Trace flow from applications through a Collector into Tempo, with Grafana querying all three signals.
How Tempo fits with the Collector and the rest of the Grafana stack
The Collector receives, processes and exports, Tempo stores and answers trace queries, and Grafana provides the query and visualization layer. Keeping these roles separate is the main design decision in this topic. Applications send OTLP traces to a Collector, which handles batching, retries, attribute handling and routing. The Collector then exports the traces to Tempo, and Grafana reads from Tempo as a data source to search and display them. Each component can be upgraded, scaled and secured on its own schedule. Before the build starts, confirm which Collector deployment pattern you will use (agent, gateway or both) and whether applications can reach Tempo directly, since a direct path skips the processing and buffering that the Collector provides. The OpenTelemetry Collector documentation describes the receiver, processor and exporter model that this split relies on.
The Collector also sits between applications and storage so that policy lives in one place. Redaction, attribute filtering, sampling and authentication on incoming connections can be configured there instead of in every service, and the exporter to Tempo can carry its own credentials. Linking traces to Loki logs and Prometheus metrics works through shared identifiers rather than through a link inside Tempo. Trace IDs in log lines let Grafana jump from a log entry to its trace, and resource attributes such as service.name become labels or fields that match across signals. Those matches only hold if your instrumentation uses the same service names, namespaces and attribute keys across traces, logs and metrics. Audit this naming in your own services before you build dashboards or derived links, because mismatched names are the usual reason correlation appears to fail. Confirm the exact fields your Loki and Prometheus pipelines produce in your environment rather than assuming them.
Which Tempo deployment and storage options fit your environment
This table compares the deployment, storage and Grafana edition choices that shape a self-hosted Tempo trace store. Read each row as a decision: when the option fits, and what it asks of your operations team. Confirm Tempo-specific deployment modes and storage backends in the official Tempo documentation before you commit to a design.
| Decision | Option | When it fits | Operations cost |
|---|---|---|---|
| Tempo deployment mode | Single binary | Proofs of concept, labs and low trace volume where one process and one storage location are enough | Simple to start, but a single process limits scaling and recovery options; confirm the mode and its limits in the Tempo docs |
| Tempo deployment mode | Distributed components | High trace volume, separate ingest and query scaling, and teams that run Kubernetes or have capacity to operate several components | More components to deploy, upgrade, monitor and size; confirm the component layout and Helm options in the Tempo docs |
| Trace storage backend | Local disk | Short tests and single-node evaluations where losing traces on a host failure is acceptable | Retention and recovery are tied to one host; no shared store for scaling or replacement |
| Trace storage backend | Object storage | Production retention of OTLP traces where you want durable, separately scaled storage in infrastructure you control | Bucket provisioning, access keys, lifecycle rules and backup policy are your responsibility; confirm supported object stores in the Tempo docs |
| Grafana configuration database | SQLite 3 (default) | Testing and evaluation of Grafana in front of Tempo | Grafana's installation docs say SQLite does not scale for production, so do not use it for production or high availability |
| Grafana configuration database | MySQL 8.0 or later, or PostgreSQL 12 or later | Production Grafana and any high availability setup with two or more active-active servers behind a load balancer | Database provisioning, backups, upgrades and failover become part of the platform; Grafana HA also needs alerting configured to avoid duplicate notifications |
| Grafana edition for SSO | Open source | Teams using LDAP, generic OAuth, Entra ID, Okta, GitHub, GitLab, Google OAuth, auth proxy or JWT, which all editions support | SAML, team sync, active sync and SCIM are not available here, so provisioning and group mapping need another approach |
| Grafana edition for SSO | Grafana Enterprise | Organizations that require SAML, team sync, active sync or SCIM provisioning in a self-hosted Grafana | Commercial licensing cost and procurement effort; ask the vendor for a written quote tied to your deployment size |
| Grafana configuration as code | Provisioning files or Terraform | Teams that need data sources, including the Tempo data source, to be reproducible across environments | Repository, review and pipeline work; provisioning files load at startup and need a plan for secrets |
Setting up Tempo ingestion, storage and Grafana queries
This sequence takes a self-hosted deployment from a confirmed Collector build to traces that are stored in Tempo, queryable in Grafana and verified end to end with a test trace.
Confirm the Collector version and distribution
The platform engineering team checks which OpenTelemetry Collector version runs in each environment and confirms it is the contrib distribution, since the Tempo-facing components you plan to use must be present in the build. Collector releases ship the contrib distribution with signed artifacts, SHA256 checksums and SBOM files, so verify those against the release you deploy. Record the version in your change log before any configuration changes. The step is done when every Collector that will export traces reports the same version and the build includes the exporter you plan to use. Confirm the exact component list with the release notes for your chosen version, since component stability varies and is documented in each component's README.
Configure Tempo's OTLP receiver and bucket
The team sets up Tempo with an OTLP receiver enabled and points its storage block at an object storage bucket you control, such as an S3-compatible service. Bind the receiver to an internal address and restrict network access to the Collector hosts, because the receiver should not be reachable from untrusted networks. Create the bucket with versioning and access policies agreed with your security team, and give Tempo a dedicated credential with only the permissions it needs on that bucket. The step is done when Tempo starts without errors and its readiness endpoint responds. Confirm the exact configuration keys for your Tempo release in the Tempo documentation before you deploy.
Point the Collector trace exporter at Tempo
The Collector team adds an OTLP exporter to the traces pipeline that targets the Tempo receiver endpoint over TLS. Authentication is configured with a Collector extension, such as the oauth2client extension for token-based credentials, so that the exporter attaches credentials to each outgoing request instead of storing them in plain text. Keep the Collector configuration file under access control, and reference secrets from your secret store rather than writing them into the file. Check that the traces pipeline has a batch processor and that no unused components are present in the build. The step is done when the Collector starts with no exporter errors in its logs and the exporter counters show sent spans with no failures.
Send a test trace through the Collector
An engineer sends a known test trace from a sample application or a telemetry generator through the Collector into Tempo, using a distinct service name so the trace is easy to find. The Collector's own logs and metrics show whether the span was received, processed and exported. Use the trace ID printed or logged by the test client as the reference for later checks. The step is done when the Collector reports the span as exported and Tempo accepts the write without a rejection in its logs. If the Collector reports a failure, check the exporter endpoint, TLS trust chain and credentials before changing any other setting.
Verify blocks are written to the bucket
The storage owner confirms that Tempo has flushed trace data into the object storage bucket by listing the bucket contents after the test trace has been ingested and the ingester flush interval has passed. Tempo stores data as blocks in the bucket, so new objects should appear under the tenant path for the test data. Compare the object count and timestamps against the test run, and confirm that the credential used by Tempo can read and write only the intended prefix. The step is done when the bucket contains new block data that corresponds to the test trace window. Ask the Tempo documentation for your release what the expected block layout looks like, and note that the flush timing is a configuration setting you should confirm rather than assume.
Add Tempo as a Grafana data source as code
The Grafana administrator defines Tempo as a data source in a provisioning file loaded at startup, so the connection is versioned with the rest of the configuration and not created by hand in the user interface. The file sets the Tempo URL, the access method and any authentication header, and it should reference credentials through environment variables or the secret store. Grafana also supports as-code workflows such as Terraform and Git Sync for teams that manage data sources in those tools. Reload Grafana and confirm the data source is listed with a successful connection test. The step is done when the data source test passes and the configuration file is stored in the same repository as your other Grafana provisioning.
Query the test trace in Grafana
A user with read access opens Grafana's Explore view, selects the Tempo data source and searches for the test service name or pastes the trace ID from the test run. The trace view should show the span hierarchy, service name and attributes that the test client set. Check that the search by service and the lookup by trace ID both return the same trace, which confirms that the query path works and not only ingestion. The step is done when the test trace renders in Grafana with its expected spans. Keep this trace available for later checks, and record which Grafana role was used so that access expectations are documented.
Check trace-to-log and trace-to-metric links
The team configures the Tempo data source settings to link trace spans to matching Loki logs and Prometheus metrics, using the data source UIDs that Grafana assigns to those sources. Open the test trace and follow each link to confirm it opens the correct log lines or metric series for the same service and time range. Link fields such as the trace ID label in logs must match what your Collector and log shipper emit, so compare a sample log line with the trace ID before concluding the setup works. The step is done when a span can open its related log query in Loki and its related metric query in Prometheus, and both show results for the test window. Confirm exact field names with the Grafana documentation for your version.
Linking traces to Loki logs and Prometheus metrics in Grafana
Correlation between Tempo, Loki and Prometheus is a set of matching fields, not a feature Tempo turns on by itself. Grafana can jump from a span to related logs and metrics only when the same identifiers appear in each signal and the Grafana data sources are configured to know where to look. Start by deciding which identifiers your pipelines will carry: the trace ID and span ID in log records, the service.name resource attribute on traces, logs and metrics, and any additional attributes such as service.namespace or deployment.environment that you want to filter on in every backend. Write this list down before instrumentation work begins, because changing it later means touching every service.
In Grafana, the links live in the data source settings. On the Tempo data source, the trace-to-logs setting points at a Loki data source and maps span tags to log labels, and the trace-to-metrics setting points at a Prometheus data source with a query template. On the Loki data source, a derived field can extract the trace ID from a log line with a regular expression and turn it into a link to Tempo. Loki and Prometheus must be deployed and receiving data separately, and their own topics cover that setup. Confirm the exact setting names and label-mapping options against the Grafana version you run, because these screens change between releases.
Correlation quality depends on instrumentation consistency, so test it before relying on it. Pick a request that crosses at least two services, trigger it, open the resulting trace in Tempo, and follow each link to the matching logs and metrics. Check that the trace ID in the log line matches the trace ID shown in Tempo, that the service name in the logs and metrics equals the service name on the span, and that the time window returns the expected records. Repeat the test for each language runtime and each deployment environment, since a single service that names its resources differently will break the chain for every trace it touches. Keep a short test script or saved query set so the check can be rerun after upgrades or configuration changes. Record which links fail and why, and treat those failures as defects in instrumentation or pipeline configuration rather than as Grafana faults.
Securing Tempo, its storage and trace data
Trace data often carries user identifiers, request details and internal service names, so it needs the same protection as the systems it describes. The controls below cover four places where exposure happens: the OTLP path into the Collector, the Collector configuration itself, the Tempo and Grafana services, and the object storage holding traces. Check each one before production traffic flows.
Authenticate OTLP ingress
Traces reach Tempo through Collector receivers, and an open receiver accepts spans from anything that can reach it. Collector authenticator extensions can check incoming connections, for example with OIDC, so only approved services send telemetry. Encrypt the receiver with TLS as well. Confirm which authenticator your Collector distribution includes and test that a service without credentials is refused.
Collector configuration docsProtect Collector configuration
The Collector configuration holds exporter endpoints, tokens and TLS material, so it should be stored with restricted access and encrypted at rest. Pass credentials through environment variables or a secrets store rather than writing them into files in source control. Review who can edit the pipeline, since a changed exporter can redirect all trace data to another destination.
Collector security best practicesRedact sensitive span attributes
Span attributes often capture URLs with query strings, SQL text, headers and user identifiers, and these persist in Tempo for the full retention period. Add the Collector's redaction processor to delete or mask attributes that carry personal or regulated data before the export step. Test the rules against sample spans from each service, because an attribute name that changes in a library update can slip past them.
Harden Grafana settings
Grafana is the query path into stored traces, so its web security settings matter as much as the data store. Use secure and SameSite cookies, a Content Security Policy, hide the version from unauthenticated users, and require authentication on the metrics endpoint. Enable domain verification against DNS rebinding. Verify each setting against the hardening guide for the Grafana version you run.
Grafana hardening docsScope bucket access to Tempo
Tempo writes trace blocks to object storage, so anyone with broad credentials on that bucket can read every trace. Create a dedicated identity that can only read and write the Tempo bucket or prefix, and keep administrative keys out of the Tempo configuration. Rotate these credentials on a schedule your team sets, and confirm that backups of the bucket inherit the same access restrictions.
Keep Collector server ports local
Since Collector v0.110.0, server components bind to localhost by default instead of all interfaces. Any setting that moves a receiver to 0.0.0.0 or a public address must be paired with the authentication and TLS controls above. Review the bind addresses in every deployed configuration, including gateway Collectors in other networks, and confirm with a port scan from outside the trusted segment.
Running Tempo after go-live: upgrades, backups and retention
The recurring work on a self-hosted Tempo deployment starts with a release calendar. Grafana's upgrade guidance describes major releases once a year, in April or May, minor releases every other month, and patch releases at least monthly. Each minor release is supported for 9 months, and the last minor release of a major version for 15 months. Build that cadence into your change calendar, and assign an owner to read release notes for Tempo and the Grafana components you run next to it, since Grafana and Tempo are versioned and released separately. Before each upgrade, run the new version in a non-production environment against a copy of your Tempo configuration, your object storage settings and your Grafana data source definitions. Confirm the Tempo release notes for changes to configuration keys and to the block format before you schedule a rollout. Ask your team to confirm the supported upgrade path between your current and target versions with the vendor documentation, because skipped releases are not always safe.
Backups for Tempo cover more than one thing. Keep the Tempo configuration files and any Kubernetes or Helm values in version control, so a rebuild does not depend on memory. Back up the Grafana configuration database, which holds the data source definitions, dashboards and users if you do not provision them as code, and test a restore into a scratch environment. Trace data itself lives in the object storage bucket, which usually needs its own durability controls, such as bucket versioning or replication, set by the team that owns the storage platform. Document who may delete objects and how a retention rule is changed, because a misconfigured lifecycle policy can remove traces faster than anyone notices.
Retention is set in two places, and they must agree. Tempo's compactor and block retention settings control how long trace data is kept, while any object storage lifecycle policy you add can delete data independently. Agree the retention period with the teams that need traces for incident review and audit evidence, and record it. Monitoring is the last piece. Track Collector health, including the exporter failure and queue metrics the Collector reports, and alert when Tempo ingestion errors rise or when the Collector drops data, so that trace loss becomes a visible alert instead of a gap found during an investigation. Ask your operations partner or internal team to confirm which Collector and Tempo metrics your chosen versions expose.
Questions buyers ask before storing traces in Tempo
What does a Tempo trace storage project cost, and what drives the price?
Cost depends on the scope agreed in writing, not on a standard package. A self-hosted Tempo build has three cost groups: the engineering work to instrument and route traces, the infrastructure that runs Tempo, Grafana and an object store in your environment, and the ongoing operation of upgrades, backups and capacity. Your current instrumentation state, the number of services and the trace volume change the work most. Storage retention, high availability requirements and how many teams query traces also add effort. Ask any partner for a quote that lists each component separately, marks what is one-time and what recurs, and names which parts your team carries. DeployOpen does not publish a price list; a quote follows from the written scope.
Can our team set up Tempo ourselves without a partner?
Often yes, if you already run Kubernetes or Linux services, have object storage and have engineers who know OpenTelemetry. The harder parts are usually not the first deployment but the surrounding work: getting every service to emit OTLP traces with consistent resource attributes, deciding how the Collector routes data, setting access and retention, and keeping the stack upgraded. Grafana's upgrade guidance describes minor releases every other month and patch releases at least monthly, so someone must own that cycle. Consider a partner for a fixed-scope first build and then keep the upgrade and operations work in-house, or ask for a retainer if you cannot staff it.
What do we need to provide before a partner starts work on Tempo?
Plan to provide access and information before design begins. Typical requirements include cloud accounts or data center access where Tempo will run, a bucket or object storage location with credentials scoped to the trace data, a decision on the identity provider for Grafana sign-in, and a set of sample OTLP traces from representative services. Name the people who approve network changes, retention rules and data handling. If traces may carry personal or regulated data, tell the partner early so redaction can be designed in. Confirm the exact access model with your own security team, since it depends on your environment.
How long does a Tempo implementation take?
The timeline follows from the scope, so no fixed duration applies to every team. The main variables are how many services need instrumentation, whether the Collector pipelines already exist, how many environments you run, whether high availability is required, and how much your identity provider integration must be reviewed. Grafana's high availability guidance requires two or more active-active Grafana servers behind a load balancer sharing a MySQL or PostgreSQL database, which adds infrastructure work before go-live. Ask for a written plan with phases, owners and acceptance checks, and ask which phases depend on decisions or access you have not yet provided.
Does Tempo's AGPLv3 license matter for our organization?
It matters when your legal or procurement team has rules about AGPL-licensed software, or when you plan to modify Tempo and offer it to users over a network. Grafana Labs relicensed Grafana, Loki and Tempo from Apache License 2.0 to AGPLv3 on April 20, 2021, while plugins and SDKs kept other licenses and Grafana Enterprise is offered as a non-AGPL commercial option, according to the Grafana Labs licensing page. Have counsel review the license terms against your intended use before you commit. Keep in mind that OpenTelemetry itself is separately licensed, so the Collector pipeline and the trace store can carry different obligations.
Should we use Grafana Cloud or host Tempo ourselves?
Choose self-hosting when trace data must stay inside networks you control or when you need to manage the full stack. Choose a managed service when you prefer to pay for operation and accept the provider's hosting location and terms. Grafana's pricing page lists a free tier, a Pro tier starting with a 19 US dollar monthly platform fee plus usage, and an Enterprise tier with a minimum commitment of 25,000 US dollars per year. Those figures apply only to Grafana Cloud, and current pricing should be confirmed on the pricing page before any decision. Self-hosting shifts cost to your infrastructure, staff time and upgrades. Ask any partner to compare both options against your data residency and staffing needs.
Which identity features need Grafana Enterprise or Cloud?
Only some. According to the Grafana authentication docs, all editions support LDAP, generic OAuth, Entra ID, Okta, GitHub, GitLab and Google OAuth, auth proxy and JWT. SAML, team sync, active sync and SCIM provisioning are available only in Grafana Enterprise and Grafana Cloud. If your organization requires SAML or automated user provisioning from its identity provider, factor that into the edition decision and the cost comparison. Confirm the supported options for your chosen version with your identity team before design starts.
How do we know the Tempo stack is hardened before it holds production traces?
Ask for a configuration review against Grafana's security hardening guidance, which covers secure and SameSite cookies, a Content Security Policy, Trusted Types, hiding the version from unauthenticated users, requiring authentication for the metrics endpoint and domain verification against DNS rebinding. On the Collector side, OpenTelemetry's security guidance recommends encrypted and authenticated endpoints and the redaction processor for sensitive attributes. Ask the partner to show the evidence: configuration files, access test results and a record of what was changed. DeployOpen can test and harden these systems, but it does not issue audit reports or certifications; independent assessors do that work.
How DeployOpen scopes and delivers a self-hosted Tempo deployment
DeployOpen plans and delivers self-hosted Grafana Tempo trace storage inside infrastructure you control, with the OTLP ingestion path, object storage, Grafana querying and trace-to-log and trace-to-metric links agreed before any build starts. Engagements are fixed-scope, so the written scope sets what gets built, tested and handed over.
How we scope
- Confirm which OpenTelemetry sources send traces, over which protocol, and at what expected trace volume and retention.
- Agree where Tempo runs, which object storage holds trace blocks, and which Grafana instance and identity provider users will sign in through.
- Record in the written scope how Collectors, Loki and Prometheus links will be wired, plus any redaction rules required before data reaches Tempo.
How we build
- Deploy Tempo and the Collector pipelines that feed it, with configuration kept as code and reviewed before rollout.
- Configure the Grafana data source, provisioned as YAML or JSON, so trace-to-log and trace-to-metric links are reproducible across environments.
- Test ingestion, query paths and access controls against the agreed scope, then document the results alongside the configuration.
How we hand over
- Deliver runbooks covering ingestion checks, object storage access, retention settings and the steps to restart or scale each component.
- Provide the configuration repository, Grafana provisioning files and a record of the security settings applied during hardening.
- Walk your platform and security teams through the deployment so they can review it and operate it without DeployOpen involved.
How we support
- Ongoing support, upgrades and continuous testing are available as retainers, so Tempo and Grafana versions can be kept current on your schedule.
- Retainer scope, response expectations and upgrade windows are written down before work starts, so you know what is covered.
- Confirm with your team which Grafana release line and support window apply to your deployment before planning each upgrade.

