0%

Preparing the page

The Grafana LGTM Stack Explained: Loki, Grafana, Tempo and Mimir

The Grafana LGTM stack explained: Loki for logs, Grafana for visualisation, Tempo for traces and Mimir for metrics, plus self-hosted vs Grafana Cloud.

Joseph

Joseph · Cloud Consulting

· 4 min read

Share
Placeholder illustration

Many teams start with Prometheus and Grafana, then add a logging tool, then a tracing tool, then struggle to connect them. The Grafana LGTM stack brings all of these together under one design philosophy.

This guide explains each component, how they work together and whether to self-host or use Grafana Cloud.

Many teams start with Prometheus and Grafana, then add a logging tool, then a tracing tool, then struggle to connect them.

What is the Grafana LGTM stack?

LGTM is an acronym for four open-source projects from Grafana Labs:

ComponentSignalWhat it does
LokiLogsLog aggregation that indexes labels rather than full text
GrafanaVisualisationDashboards, exploration, alerting across many data sources
TempoTracesHigh-scale distributed tracing backed by object storage
MimirMetricsHorizontally scalable, long-term Prometheus-compatible metrics storage

Many teams also add Pyroscope for continuous profiling and Grafana Alloy, Grafana Labs' OpenTelemetry Collector distribution, for collection.

How does Loki keep log costs low?

Loki indexes only a small set of labels (such as service, environment and namespace) and stores the log content compressed in object storage. Queries filter by labels first, then scan the matching logs. This makes ingestion and storage cheaper than full-text indexing systems, at the cost of designing labels carefully. Too many unique label values hurt performance, the same cardinality problem seen in metrics.

Why use Mimir instead of plain Prometheus?

Prometheus is excellent for scraping and short-term storage on a single server. At scale, teams need long-term retention, high availability and a global view across many clusters. Mimir provides that while remaining compatible with PromQL and Prometheus remote write, so existing dashboards and alerts keep working.

How does Tempo work?

Tempo stores traces in object storage without heavy indexing, making it cost-effective to keep large volumes. Traces are found via trace IDs from logs and metrics (exemplars), or with TraceQL queries. The result is easy navigation: from a metric spike, to an exemplar trace, to the logs for that exact request.

Metric → exemplar → trace → logs

How do the components work together?

The real power is correlation inside Grafana:

  1. A dashboard shows a latency spike in Mimir metrics.
  2. An exemplar links to a slow trace in Tempo.
  3. The trace's span links to its logs in Loki.
  4. A profile in Pyroscope shows which function consumed the CPU.

This flow is what turns monitoring into observability.

Should you self-host LGTM or use Grafana Cloud?

FactorSelf-hosted LGTMGrafana Cloud
Licence costOpen source (AGPLv3)Usage-based subscription
Operational effortHigh: scaling, upgrades, storageManaged by Grafana Labs
FeaturesCore projectsCore plus ML, Sift, Assistant, incident, synthetics
ControlFullHigh, with managed infrastructure
Best forTeams with strong platform engineering capacityTeams that want to focus on using, not running, observability

Self-hosting looks free but requires engineers to run a distributed system at scale. For most organisations, the managed option costs less in total once engineering time is counted.

How Crozaint approaches the LGTM stack

Crozaint delivers unified observability on Grafana Cloud using Mimir, Loki and Tempo, with OpenTelemetry instrumentation. In our 8-week engagement we deploy the platform, instrument services, design SLOs and dashboards, engineer high-signal alerting and train your team to run it independently.

We also enable Grafana Cloud's AI features: Grafana ML for anomaly detection, Sift for incident investigation and Grafana Assistant for natural-language queries. AI assists; your engineers stay in control.

Common mistakes to avoid

  • Using high-cardinality labels in Loki
  • Self-hosting without budgeting engineering time
  • Deploying the components without linking exemplars and trace IDs
  • Migrating dashboards one-to-one instead of redesigning around SLOs
  • Running separate Grafana instances per team with no shared standards

Conclusion

The LGTM stack gives you metrics, logs and traces that work together, built on open standards. Choose managed or self-hosted based on your team's capacity, not just licence cost.

Considering Grafana Cloud? Book a 30-minute discovery call with Crozaint.

Frequently Asked Questions

What does LGTM stand for in Grafana?

LGTM stands for Loki, Grafana, Tempo and Mimir. Loki handles logs, Grafana handles visualisation and alerting, Tempo handles distributed traces and Mimir handles metrics. Together they form Grafana Labs' open-source observability stack, also available as the managed Grafana Cloud service.

Is Grafana Loki better than Elasticsearch for logs?

Loki is usually cheaper to run because it indexes only labels, not full log text. Elasticsearch offers powerful full-text search and analytics but needs more storage and compute. Loki suits operational logging tied to metrics and traces; Elasticsearch suits heavy text search and analytics use cases.

Is Mimir a replacement for Prometheus?

Mimir complements Prometheus rather than replacing it. Prometheus or an OpenTelemetry Collector still scrapes metrics, then sends them via remote write to Mimir for scalable, highly available, long-term storage. Mimir is fully compatible with PromQL, so dashboards and alerts continue working.

Is the Grafana LGTM stack free?

The core projects are open source under the AGPLv3 licence and free to self-host. You still pay for infrastructure and engineering time to run them. Grafana Cloud offers a managed version with a free tier and usage-based pricing for larger workloads.

Can LGTM work with OpenTelemetry?

Yes. Loki, Tempo and Mimir all accept OpenTelemetry data, and Grafana Alloy is a distribution of the OpenTelemetry Collector. Using OpenTelemetry for instrumentation keeps your telemetry vendor-neutral while taking advantage of the LGTM stack.

Joseph

Written by

Joseph

Cloud Consulting · 15 articles

Joseph has spent fifteen years at the operating end of infrastructure — from data-centre and network operations to multi-cloud consulting across AWS, Azure and GCP. He turns unreadable cloud bills into decisions teams can act on, and he knows the automation underneath them — Terraform, Ansible, Kubernetes — well enough to make the savings stick.

Reviewed for technical accuracy by Girish.

After the reading

Reading About Observability Is the Easy Part.Doing It in Your Estate Is Ours.

Thirty minutes with the people who wrote this. We look at your setup, say what we would fix first and leave you with a plan, whether or not you go further with us.

  • A look at your estate, not a demo
  • What we would fix first, and why
  • A plan you keep, whether or not you hire us
Joseph

Talk to Joseph

Wrote this article · Cloud Consulting

Thirty minutes on your estate. Joseph looks at what you have and tells you what we would do first.

Book 30 Minutes

No deck, no pitch, no commitment.