Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.keywordsai.co/llms.txt

Use this file to discover all available pages before exploring further.

Overview

export_spans(spans: SpanBuffer | List[ReadableSpan]) -> bool
Exports spans with the configured exporter. Returns True on success.

Example

from keywordsai_tracing import get_client

client = get_client()
with client.get_span_buffer("trace-xyz") as buffer:
    buffer.create_span("task", {"success": True})
spans = buffer.get_all_spans()
client.export_spans(spans)