tokentrace Tutorials
Step-by-step tutorials for tokentrace. Learn how to instrument your first inference call, set up cost and quality alerts, and build a Grafana dashboard for AI system observability.
Instrument Your First Inference Call
10 minAdd tokentrace to an existing Go program, instrument a single inference call with Start/Record/End, and inspect the structured trace output. Full working code included.
Set Up Cost and Quality Alerts
20 minDefine cost_spike and quality_drop alert rules, configure webhook delivery, and attach matchspec eval scores to spans so quality regressions page you before users notice.
Build a Grafana Dashboard
25 minExport tokentrace metrics to Prometheus, import the pre-built dashboard JSON, and customize panels for cost over time, latency heatmap, model usage breakdown, and alert history.