Exploring data in Grafana
Use the Explore view for quick, ad-hoc queries of your observability data and for interactive investigations.
Opening Explore
- Click the Explore icon in the left sidebar (compass icon)
- Select your data source from the dropdown at the top
Querying logs (Loki)
Select your Loki data source, then enter a LogQL query:
{k8s_namespace_name="my-namespace"} |= "error"
This finds all logs from my-namespace that contain the word "error". For stdout logs collected by PaaS Logging, the namespace label is namespace.
Common LogQL patterns
| Pattern | Meaning |
|---|---|
{service_name="myapp"} | Logs from the service named "myapp" |
|= "text" | Contains "text" |
|~ "regex" | Matches regex |
!= "text" | Does not contain "text" |
See LogQL best practices for query optimization tips.
Querying metrics (Mimir)
Select your Mimir data source, then enter a PromQL query:
sum(rate(http_server_request_duration_count{job="my-namespace/my-service"}[5m]))
This shows HTTP requests per second, averaged over 5-minute windows. Replace my-namespace/my-service with your service's job label. Metrics — Example queries explains the label and the metric name on older SDKs.
Common PromQL patterns
| Pattern | Meaning |
|---|---|
metric_name | Raw metric value |
rate(metric[5m]) | Per-second rate over 5 minutes |
sum by (label) (metric) | Aggregate by label |
For detailed PromQL documentation, see the Prometheus docs.
Viewing traces (Tempo)
Select your Tempo data source. You can:
- Search by trace ID
- Search by service name and operation
- Find traces by duration or status
When you open a trace, it shows the whole path of the request across services, with the timing of each span.
Tips
- Adjust the time range in the time picker (top right) before you run an expensive query
- For logs, click Live to stream new log lines in real time
- Click Split to compare two queries side by side