Class SpanEvent
- Namespace
- LMKit.Agents.Observability
- Assembly
- LM-Kit.NET.dll
Represents an event that occurred during a span.
public sealed class SpanEvent
- Inheritance
-
SpanEvent
- Inherited Members
Examples
Recording an event on a span and reading it back:
using LMKit.Agents.Observability;
using var span = tracer.StartAgentSpan(agent, "input");
span.AddEvent("model_inference_started",
new Dictionary<string, object> { ["model"] = "qwen3:8b" });
// Inside an exporter:
foreach (SpanEvent ev in span.Events)
{
Console.WriteLine($"[{ev.Timestamp:HH:mm:ss.fff}] {ev.Name}");
}
Properties
- Attributes
Gets the event attributes.
- Name
Gets the event name.
- Timestamp
Gets the timestamp of the event.