Table of Contents

Namespace LMKit.Agents.Observability

Classes

AgentDiagnostics

OpenTelemetry-compatible diagnostic source for the agent runtime.

Exposes a single ActivitySource named LMKit.Agents that the orchestration and execution layers use to emit distributed-trace activities. Consumers register the source with their tracer of choice (OpenTelemetry, .NET ActivityListener, Application Insights, etc.) to capture spans for orchestration runs, individual agent invocations, and delegations.

This is independent of the in-tree IAgentTracer system: agent tracers receive structured per-iteration events tied to the planning loop, while ActivitySource emits coarser distributed-trace spans suitable for cross-process correlation.

AgentMetrics

Collects and exposes metrics about agent execution.

Tracks counts, durations, and other statistics that can be exported to monitoring systems.

AgentSpan

Represents a traced execution span for agent operations.

Spans track the duration, status, and metadata of agent operations, forming a hierarchical trace of execution.

AgentTracing

Provides global configuration for agent tracing.

Configure the default tracer here to enable tracing across all agent executions.

CompositeTracer

A tracer that forwards to multiple underlying tracers.

Use this to send traces to multiple destinations simultaneously (e.g., console for debugging and OpenTelemetry for production monitoring).

ConsoleTracer

A tracer that outputs to the console for debugging.

Useful during development to see agent execution flow. Not recommended for production use.

InMemoryTracer

A tracer that stores spans in memory for inspection.

Useful for testing, debugging, and building custom trace visualizations.

JsonTraceExporter

Exports traces as JSON for analysis or debugging.

LogEntry

A recorded log entry.

MetricEntry

A recorded metric entry.

NoOpTracer

A tracer implementation that does nothing.

Use this when tracing is disabled or not needed. All operations return immediately with minimal overhead.

SpanEvent

Represents an event that occurred during a span.

TraceSummary

Summary of stored traces.

TracingAgentExecutor

An agent executor wrapper that adds tracing to all operations.

Wraps an existing executor and adds spans for agent execution, tool calls, planning steps, and other operations.

Structs

HistogramStats

Statistics for a histogram metric.

Interfaces

IAgentTracer

Interface for tracing agent operations.

Implement this interface to integrate with your preferred observability system (OpenTelemetry, Application Insights, custom logging, etc.).

ITraceExporter

Interface for exporting traces to external systems.

Enums

LogLevel

Log levels for tracer logging.

SpanKind

The kind of span.

SpanStatus

The status of a span.

Share