How do you correlate logs and metrics in Grafana?
⚡
Quick Answer
Add Loki as a data source alongside Prometheus and use shared labels plus data links to jump from a metric spike to the matching logs.
Detailed Answer
With Prometheus and Loki using consistent labels (service, namespace, pod), you can place a metrics panel and a logs panel on one dashboard filtered by the same variables. Grafana's split view and derived fields let you pivot from a latency spike to the exact log lines, and exemplars can link a histogram bucket to a trace.
💡
Interview Tip
Mention exemplars for metrics-to-traces linking.
grafanalokilogs