Class JsonTraceExporter
- Namespace
- LMKit.Agents.Observability
- Assembly
- LM-Kit.NET.dll
Exports traces as JSON for analysis or debugging.
public sealed class JsonTraceExporter : ITraceExporter, IDisposable
- Inheritance
-
JsonTraceExporter
- Implements
- Inherited Members
Constructors
- JsonTraceExporter(TextWriter)
Initializes a JSON exporter that writes to a TextWriter.
- JsonTraceExporter(string)
Initializes a JSON exporter that writes to a file.
Properties
- AutoFlush
Gets or sets whether to auto-flush after each span.
- BufferedCount
Gets the number of spans currently buffered.
Methods
- Dispose()
Disposes the exporter, flushing any remaining spans.
- Export(AgentSpan)
Exports a completed span.
- Flush()
Flushes any buffered spans.
- GetJson()
Gets all buffered spans as a JSON string without clearing the buffer.