Parameters for a single span annotation

interface SpanAnnotation {
    annotatorKind?: "LLM" | "CODE" | "HUMAN";
    identifier?: string;
    label?: string;
    metadata?: Record<string, unknown>;
    name: string;
    score?: number;
    spanId: string;
}

Properties

annotatorKind?: "LLM" | "CODE" | "HUMAN"

The kind of annotator used for the annotation Can be "HUMAN", "LLM", or "CODE"

"HUMAN"
identifier?: string

The identifier of the annotation. If provided, the annotation will be updated if it already exists.

label?: string

The label assigned by the annotation

metadata?: Record<string, unknown>

Metadata for the annotation

name: string

The name of the annotation

score?: number

The score assigned by the annotation

spanId: string

The OpenTelemetry Span ID (hex format without 0x prefix)