How do you make logs, metrics and traces correlate in Grafana?
IntermediateProductionLog Pipelines
Answer
- Same resource labels everywhere:
service,namespace,cluster,env. trace_idin every log line; Loki derived fields turn it into a link to Tempo.- Tempo "trace to logs" and "trace to metrics" configured with the shared labels.
- Exemplars on latency histograms linking to traces.
Using the OpenTelemetry SDK for all signals gives consistent service.name and resource attributes automatically.
More on Log Pipelines
What does a production log pipeline look like end to end?BeginnerWhy structured (JSON) logging, and what fields should every log line have?BeginnerFluent Bit, Vector, Grafana Alloy or the OpenTelemetry Collector: how do you choose a log agent?IntermediateWhy add an aggregation tier instead of sending directly from agents to the backend?IntermediateHow do you design log retention tiers?IntermediateHow do you scrub PII from logs in the pipeline?Intermediate