TracerSystem

class TracerSystem(val eventStore: EventStore = EventStore(), enabled: Boolean = true) : Tracer

Central Tracer implementation backed by an EventStore.

Every recorder method packages its arguments into a TracerEvent and stores it in the underlying buffer; live consumers can subscribe via eventStore.events.

Disable the system globally with disable / enable to skip recording without changing wiring.

Mirrors the Python reference TracerSystem (tracer/tracer_system.py).

Constructors

Link copied to clipboard
constructor(eventStore: EventStore = EventStore(), enabled: Boolean = true)

Properties

Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
suspend fun clear()

Drop every event from the underlying EventStore.

Link copied to clipboard
fun disable()

Disable event recording without changing wiring.

Link copied to clipboard
fun enable()

Enable event recording (default).

Link copied to clipboard
open suspend override fun recordAgentInteraction(fromAgent: String, toAgent: String, eventType: String, eventId: String?, correlationId: String?)

Emitted by Dispatcher / Router when the Phase 4 agent system routes an event between agents.

Link copied to clipboard
open suspend override fun recordLlmCall(model: String, messages: List<LlmMessage>, temperature: Double, tools: List<String>?, correlationId: String?)
Link copied to clipboard
open suspend override fun recordLlmResponse(model: String, content: String?, toolCalls: List<LlmToolCall>?, callDuration: Duration, correlationId: String?, usage: JsonObject? = null, providerModel: String? = null, finishReason: String? = null, metadata: JsonObject? = null)

Records an LLM response. model is the configured request model. The evidence parameters carry what the provider reported, unchanged: usage is never estimated and stays null when the provider reported none.

Link copied to clipboard
open suspend override fun recordToolBatch(batchId: String, toolNames: List<String>, successCount: Int, failureCount: Int, callDuration: Duration, correlationId: String?, caller: String? = null)

Emitted once per parallel tool batch in addition to the per-call recordToolCall events. Serial runners do not emit batch events.

Link copied to clipboard
open suspend override fun recordToolCall(toolName: String, arguments: String, result: String, callDuration: Duration, isError: Boolean, correlationId: String?, caller: String? = null)