Skip to content

agoda-com/llm-traces

LLM Traces — Grafana Plugin

CI License

A Grafana app plugin for visualizing LLM (Large Language Model) traces stored in Grafana Tempo.

Supports multiple span conventions out of the box:

  • OpenInference (Phoenix, Traceloop, etc.)
  • OTel GenAI (OpenTelemetry Semantic Conventions for GenAI)
  • Vertex AI (GCP Vertex AI Agent Builder)

Features

  • Browse and search LLM traces via TraceQL
  • Inspect input/output messages with Markdown rendering
  • View tool calls with JSON payloads
  • Multi-convention detection tabs (LLM / OpenInference / OTel GenAI)
  • Token usage and estimated cost per span
  • Trace timeline with span hierarchy visualization
  • Resizable detail panels

LLM Traces plugin showing trace list, span timeline with duration bars, and LLM span detail with input/output messages

Requirements

Component Version
Grafana ≥ 11.1.0
Node.js ≥ 22.6 (for development)
A configured Tempo datasource

Installation

From GitHub Releases (recommended)

  1. Download the latest release zip from the Releases page
  2. Extract it into your Grafana plugins directory:
    unzip llm-traces-app-*.zip -d /var/lib/grafana/plugins/
  3. Add the plugin to Grafana's allow list (required for unsigned community plugins):
    [plugins]
    allow_loading_unsigned_plugins = llm-traces-app
  4. Restart Grafana

Using Docker Compose

A ready-to-run stack with Grafana + Tempo is included for local development:

# Build the plugin first
npm install && npm run build:standalone

# Start the stack (run from repo root)
docker compose -f docker/docker-compose.yml up --build

Open http://localhost:3000 (admin / admin). Tempo OTLP endpoints are available at localhost:4317 (gRPC) and localhost:4318 (HTTP).

Requires Docker Compose v2.17+ for dockerfile_inline support.

Using provisioning

To auto-enable the plugin (Grafana app plugins must be explicitly enabled):

# /etc/grafana/provisioning/plugins/llm-traces.yaml
apiVersion: 1
apps:
  - type: llm-traces-app
    org_id: 1
    disabled: false

Usage

  1. Navigate to LLM Traces in the Grafana side menu
  2. Select a Tempo datasource
  3. Use the search bar or TraceQL to find traces
  4. Click a trace to see the full span hierarchy
  5. Click an LLM span to inspect messages, parameters, and token usage

Development

# Install dependencies (also sets up pre-commit hook via Husky)
npm install

# Build (standalone — no Grafana monorepo needed)
npm run build:standalone

# Run all unit tests
npm test

# Run individual test files
node --experimental-strip-types tests/llmUtils.unit.test.ts
node --import ./tests/node-loader.mjs --experimental-strip-types tests/tempoClient.unit.test.ts
node --experimental-strip-types tests/costUtils.unit.test.ts
node --experimental-strip-types tests/prism-traceql.unit.test.ts

# Lint & typecheck
npm run typecheck
npm run lint

Note: Node.js >= 22.6 is required for the --experimental-strip-types flag used by the test runner and build scripts.

See CONTRIBUTING.md for detailed contribution guidelines.

License

Apache-2.0

Copyright 2026 Agoda Services Co., Ltd.

About

Grafana plugin for visualizing LLM traces in Tempo — inspect prompts, completions, tool calls, token usage, and costs. Supports OpenInference, OTel GenAI, and Vertex AI span conventions.

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors