Grafana Loki
JSONL execution traces can be shipped to Loki and queried with LogQL in Grafana dashboards.
Ship JSONL traces to Loki using promtail, Grafana Alloy, or any Loki-compatible agent. The simplest approach appends traces to a log file that your agent tails:
# In your CI pipeline, after each build:grog traces export --format=jsonl --limit 1 >> /var/log/grog-traces.jsonlConfigure your Loki agent to tail this file with a grog label:
# promtail config snippetscrape_configs: - job_name: grog-traces static_configs: - targets: [localhost] labels: job: grog __path__: /var/log/grog-traces.jsonlGrafana dashboard queries
Section titled “Grafana dashboard queries”With traces in Loki, use LogQL in Grafana to build dashboards:
Build duration over time:
{job="grog"} | json | line_format "{{.total_duration_millis}}"Filter to failed builds:
{job="grog"} | json | failure_count > 0Extract cache hit rate:
{job="grog"} | json | unwrap cache_hit_count | __error__=""