Skip to main content

Span Notes API

New dedicated endpoints for span notes enable open coding and seamless annotation integrations. Add notes to spans programmatically using the Phoenix client in both Python and TypeScript. Python Client:
from phoenix.client import Client

client = Client()
client.spans.add_span_note(
    span_id="your-span-id",
    note="This span shows unexpected latency"
)
TypeScript Client:
import { addSpanNote } from "@arizeai/phoenix-client/spans";

await addSpanNote({
  spanNote: {
    spanId: "your-span-id",
    note: "This span shows unexpected latency"
  }
});
Use Cases:
  • Add contextual notes during debugging sessions
  • Annotate spans with human feedback
  • Build custom annotation pipelines and integrations
  • Document issues or observations for team collaboration

API Reference: