Telemetry and Tracing
Telemetry is enabled by default. Every agent records spans, LLM usage, and events automatically — no setup required. When connected to the mesh, telemetry exports to the Svantic dashboard. Otherwise, it exports to the console.Zero-Config Telemetry
How it works
Disabling Telemetry
Settelemetry: false in the agent config:
Custom Spans
Useagent.tracer to add your own instrumentation. Spans automatically nest — starting a span while another is active makes it a child.
Span Types
Generic spans for any operation:Span Methods
Events
For discrete signals that are not part of the span tree (e.g. “document processed”, “ticket escalated”):trace_id and span_id for correlation.
W3C Trace Propagation
When your agent calls another agent (viaRemoteAgent), trace context propagates automatically using the W3C traceparent header. This creates a unified trace across agent-to-agent calls.
Injecting context into outbound requests
For non-A2A HTTP calls (e.g. calling an external API), inject trace context manually:Adopting inbound context
When your agent receives an HTTP request with atraceparent header, adopt the remote context so your spans join the caller’s trace:
Advanced: Custom Telemetry Instance
If you need full control over export destination, auth, or flush behavior, pass your ownSvanticTelemetry instance:
Export destinations
Dashboard Integration
When telemetry exports to the Svantic mesh (the default for mesh-connected agents), your traces appear in the Svantic dashboard under the session timeline. You can:- See the full span tree for each capability invocation.
- View LLM token usage per call.
- Trace requests across agent-to-agent boundaries.
- Correlate events with the spans that produced them.
Shutdown
Telemetry flushes automatically on shutdown:agent.stop() (and agent.close()) calls telemetry.shutdown() internally, which stops the flush timer, flushes remaining data, and shuts down the exporter.