@accordkit/tracer - v0.2.1
    Preparing search index...

    Interface SpanEvent

    An event representing a timed operation, similar to a span in OpenTelemetry. Useful for instrumenting non-LLM operations like database queries, API calls, or function executions.

    interface SpanEvent {
        ts: string;
        sessionId: string;
        level: TraceLevel;
        ctx: TraceContext;
        provider?: Provider;
        model?: string;
        requestId?: string;
        service?: string;
        env?: string;
        region?: string;
        $ext?: Record<string, unknown>;
        type: "span";
        operation: string;
        durationMs: number;
        status?: "error" | "ok" | "streaming";
        attrs?: Record<string, unknown>;
    }

    Hierarchy (View Summary)

    Index

    Properties

    ts: string

    ISO8601 timestamp of when the event occurred.

    sessionId: string

    Logical identifier for a user session or conversation.

    level: TraceLevel

    Severity level of the event.

    Trace context for correlating events.

    provider?: Provider

    The AI provider SDK that emitted the event.

    model?: string

    The specific model ID used, if known (e.g., 'gpt-4-turbo').

    requestId?: string

    The unique request ID returned by the provider's API.

    service?: string

    The name of the service emitting the event.

    env?: string

    The deployment environment (e.g., 'production', 'staging').

    region?: string

    The cloud or geographical region.

    $ext?: Record<string, unknown>

    A bucket for vendor-specific or non-standard extensions.

    type: "span"

    The discriminated union type name for the event.

    operation: string

    A descriptive name for the operation (e.g., 'db:query', 'api:call').

    durationMs: number

    The total duration of the operation in milliseconds.

    status?: "error" | "ok" | "streaming"

    The status of the operation.

    attrs?: Record<string, unknown>

    A dictionary of arbitrary attributes related to the span.