Skip to content

SpanConvention

autogen.beta.eval.sources._spans.SpanConvention #

Bases: Protocol

Reads one telemetry dialect off a :class:SpanData into AG2 typed events.

Inspect the span's discriminator attribute and return the typed events it maps to — the dialect's agent/root span returns [] (recognized but event-free) — or None when the span isn't this dialect, so the next convention can try. Implement one (a single method) to make AG2 grade a new producer's traces.

to_events #

to_events(span)
Source code in autogen/beta/eval/sources/_spans.py
def to_events(self, span: SpanData) -> list[BaseEvent] | None: ...