Trace collection
Traces are collected via the Control Plane SDK and routed through the Control Plane Collector (an OpenTelemetry Collector configured for agent workloads).Automatic instrumentation
When you calllangship.init(), Control Plane patches the following libraries automatically:
| Library | What’s traced |
|---|---|
openai | Every chat completion and embedding call |
anthropic | Every message call |
langchain | Agent loops, chains, tools, retrievers, memory |
llama_index | Query engines, retrievers, LLM calls |
cohere | Chat and embed calls |
init() call.
Manual spans
For code that Control Plane doesn’t auto-instrument, add spans manually:Trace viewer
The trace viewer shows the full span tree for any run:- Timeline view: spans laid out on a horizontal time axis; see overlapping calls
- Tree view: hierarchical view of parent/child spans
- Detail panel: click any span to see full input, output, model metadata, token counts, and cost
Filtering and search
Filter runs by:- Project and environment
- Date range
- Status (success / failure / error)
- Tag or attribute value
- Latency (runs slower than N ms)
- Cost (runs above $X)
Metrics
Control Plane aggregates per-project metrics over time:| Metric | Description |
|---|---|
| P50 / P95 / P99 latency | Response time percentiles per run |
| Token usage | Input and output tokens, broken down by model |
| Cost | Estimated cost per run and per day (based on model pricing) |
| Error rate | Percentage of runs that errored |
| Tool call rate | Average number of tool calls per run |
| Eval pass rate | Percentage of runs that passed each evaluator |
Alerting
Set up alerts on any metric:- Go to your project → Alerts → New Alert
- Choose a metric (e.g., P95 latency, error rate, cost per day)
- Set a threshold and a notification channel (email, Slack webhook, PagerDuty)
Exporting to external backends
Control Plane’s collector can forward traces to any OTLP-compatible backend in parallel with Control Plane’s own storage. Incollector-config.yaml (included in the Docker Compose setup):
Session replay
Control Plane records the full conversation history for multi-turn agents. In the run detail view, click Session Replay to step through the conversation turn by turn, with the full trace visible for each turn.Cost tracking
Control Plane estimates cost for every LLM call using current model pricing. Costs are visible:- Per span (each LLM call)
- Per run (total)
- Per project per day (aggregate)
- In eval results (how much did this eval suite cost to run?)