observability
Adds tracing, telemetry, and observability to an assistant-ui backend. Use when wiring an AI SDK route handler (streamText/generateText, toUIMessageStreamResponse) to a tracing backend: Langfuse via OpenTelemetry (LangfuseSpanProcessor and NodeSDK in instrumentation.ts, experimental_telemetry isEnabled, propagateAttributes with traceName/userId/sessionId, langfuseSpanProcessor.forceFlush on serverless), LangSmith via wrapAISDK(ai) from langsmith/experimental/vercel (createLangSmithProviderOption
Security Assessment
About observability
The assistant-ui Observability skill adds tracing, telemetry, and observability to an assistant-ui backend. It solves the common problem of missing or empty traces when running AI SDK route handlers by showing exactly where telemetry plugs in — the server route that calls streamText or generateText, not the React runtime — and how to route to different tracing backends. Most of the guidance is generic AI SDK telemetry, with the assistant-ui-specific parts being the route handler and the react-o11y client primitives for rendering spans.
The skill provides provider-specific setup for Langfuse (OpenTelemetry span processor plus experimental_telemetry, with propagateAttributes for traceName/userId/sessionId and a forceFlush to avoid dropped spans on serverless), LangSmith (via a wrapAISDK wrapper, no OTel setup), and Helicone (a proxy baseURL on the provider with a Helicone-Auth header, no telemetry flag). It also covers visualizing collected spans with the @assistant-ui/react-o11y headless primitives (SpanResource, SpanPrimitive parts, providers and state hooks) mounted via the assistant-ui store, and calls out common gotchas around edge versus nodejs runtimes and serverless flush timing. Reference files detail each backend.
It targets developers building assistant-ui chat applications on the Vercel AI SDK who need production observability. Its handling of provider API keys is standard credential setup (environment variables and auth headers documented for official tracing services), with no exfiltration, so it is benign developer tooling — while noting it directs readers to consult assistant-ui.com/llms.txt for the latest API.
FAQ
Which tracing backends are supported?
Langfuse via OpenTelemetry, LangSmith via the wrapAISDK wrapper, and Helicone as a proxy. It also covers rendering collected spans with @assistant-ui/react-o11y client primitives.
Where does telemetry attach?
To the server route that calls streamText or generateText, not to the React runtime. The frontend components like useChatRuntime and Thread are unchanged; react-o11y is a separate optional client layer for drawing the trace waterfall.
Why are my traces empty or missing on serverless?
The skill addresses this directly, covering edge versus nodejs runtime telemetry and serverless flush issues — for example calling forceFlush (langfuseSpanProcessor.forceFlush) so spans are not dropped before the function ends.
How are provider credentials handled?
Through standard configuration — environment variables and auth headers such as Helicone-Auth for the official tracing services. This is normal credential setup, not exfiltration.
How do I get the latest API details?
The skill advises always consulting assistant-ui.com/llms.txt for the latest API, and includes reference files for Langfuse, LangSmith, Helicone, and react-o11y.
Install observability
Quick Setup:
- Copy the skill folder to
.claude/skills/ - Claude will automatically detect and use the skill
Repository
assistant-ui/skills