observability
Skill8 starsChanged 5 months agoMITView on GitHub
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 (createLangSmithProviderOptions, awaitPendingTraceBatches), or Helicone via createOpenAI baseURL https://oai.helicone.ai/v1 with the Helicone-Auth header. Also covers rendering collected spans with @assistant-ui/react-o11y headless primitives (SpanResource, SpanPrimitive Root/Indent/CollapseToggle/StatusIndicator/TypeBadge/Name/Children, SpanByIndexProvider, SpanData/SpanState) mounted via useAui/AuiProvider from @assistant-ui/store. Use for missing or empty traces, edge vs nodejs runtime telemetry, serverless flush issues, or trace waterfalls.
- Reads credentials
- Installs packages
103 other projects use a version of this.
Adopted by
Most recently taken up by
- Arupbiswas09/claude_skillstheir own version, first seen Nov 29, 2026
- vjrivmon/Setup-Software-IAtheir own version, first seen Nov 29, 2026
- anmolnagpal/devops-skillstheir own version, first seen Nov 29, 2026
- Mark-Life/telegram-claude-codextheir own version, first seen Nov 29, 2026
- opensearch-project/opensearch-agent-skillstheir own version, first seen Nov 29, 2026
- sivaprasadreddy/sivalabs-agent-skillstheir own version, first seen Nov 29, 2026
Used with
Projects with it also use gitops, background-jobs and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
kcns008Skillgitops
GitOps Agent (Flow) — manages ArgoCD applications, Helm charts, Kustomize overlays, deployment strategies (canary, blue-green, rolling), multi-cluster GitOps, and drift detection for Kubernetes and OpenShift clusters.
Also in 5 projects that use this
YepAPISkillbackground-jobs
Queue workers with BullMQ/Inngest/Trigger.dev, job retries, dead letter queues, concurrency.
Also in 5 projects that use this
Mushfiqur-Rahman-RobinSkillrag-systems
Best practices for building Retrieval-Augmented Generation systems — chunking, embedding, hybrid retrieval, reranking, indexing, caching, evaluation, observability — plus a catalog of RAG patterns and when each applies.
Also in 3 projects that use this
ffsshhttiikkSkillchaos-engineering
Resilience testing through controlled experiments
Also in 6 projects that use this
jholhewresSkilldora-metrics
Calculate DORA metrics from git + deploy logs
Also in 3 projects that use this
wpankSkillcaching
Caching strategies, invalidation, eviction policies, HTTP caching, distributed caching, and anti-patterns. Use when designing cache layers, choosing eviction policies, debugging stale data, or optimizing read-heavy workloads.
Also in 6 projects that use this
Other versions103 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 103
- openai/plugins★ 8.4ksame name
- BuilderIO/agent-native★ 7.8ksame name
- brianlovin/briOS★ 2.3ksame name
- lablup/backend.ai★ 684same name
- DevelopersGlobal/ai-agent-skills★ 220same name
- sivaprasadreddy/sivalabs-agent-skills★ 198same name
- kid-sid/claude-spellbook★ 190same name
- YougLin-dev/Aha-Loop★ 181same name
- proyecto26/system-design-skills★ 118same name
- TheBeardedBearSAS/claude-craft★ 109same name
93 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository16 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- public/llms-full.txtllms.txt
- public/llms.txtllms.txt
- assistant-uiSkill
- cloudSkill
- copilotsSkill
- markdownSkill
- primitivesSkill
- react-mcpSkill
- runtimeSkill
- setupSkill
- speckit-agent-context-updateSkill
- streamingSkill
- thread-listSkill
- toolsSkill
- updateSkill
The file
We split this skill into the rules it gives an agent
2 rules. 0 are common, 0 are distinctive, and 2 are very specific to this project.
0
Common
Most of the 85 edited versions we read keep these.
0
Distinctive
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 129
Use this openai instance with streamText as usual.
- Very specific: line 180
Use the destructured methods from wrapAISDK(ai), not the originals from ai.
“Common” is measured: kept by at least 6 in 10 of the 85 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
assistant-ui Observability
Always consult assistant-ui.com/llms.txt for the latest API.
Tracing and telemetry for an assistant-ui backend. Most of this is generic AI SDK telemetry; the assistant-ui specific part is the route handler and the @assistant-ui/react-o11y client primitives for rendering spans.
Contents
- References
- Where it plugs in
- Provider routing
- AI SDK telemetry (shared)
- Helicone (proxy, no OTel)
- Visualizing spans with react-o11y
- Common Gotchas
- Related Skills
References
- ./references/langfuse.md -- Langfuse tracing
- ./references/langsmith.md -- LangSmith tracing
- ./references/helicone.md -- Helicone proxy
- ./references/react-o11y.md -- @assistant-ui/react-o11y client primitives
Where it plugs in
Telemetry attaches to the server route that calls streamText/generateText, not to the React runtime. The frontend (useChatRuntime, Thread) is unchanged. react-o11y is a separate, optional client layer for drawing the trace waterfall in your own UI.
Thread (frontend) ──> /api/chat (streamText) ──> tracing backend
└─> react-o11y (optional UI)Provider routing
Langfuse → OTel span processor + experimental_telemetry, propagateAttributes
LangSmith → wrapAISDK(ai) wrapper, no OTel setup
Helicone → proxy baseURL on the provider, no telemetry flag
react-o11y → client primitives to render spans you collectedAI SDK telemetry (shared)
Langfuse and any OTel backend reuse the AI SDK experimental_telemetry flag. Enable it per call:
import { openai } from "@ai-sdk/openai";
import { streamText, convertToModelMessages } from "ai";
import type { UIMessage } from "ai";
export async function POST(req: Request) {
const { messages }: { messages: UIMessage[] } = await req.json();
const result = streamText({
model: openai("gpt-5.4-nano"),
messages: await convertToModelMessages(messages),
experimental_telemetry: { isEnabled: true },
});
return result.toUIMessageStreamResponse();
}For Langfuse, register an OTel span processor in instrumentation.ts and wrap the call so traces carry userId/sessionId:
import { NodeSDK } from "@opentelemetry/sdk-node";
import { LangfuseSpanProcessor } from "@langfuse/otel";
export const langfuseSpanProcessor = new LangfuseSpanProcessor();
export async function register() {
if (process.env.NEXT_RUNTIME !== "nodejs") return;
const sdk = new NodeSDK({ spanProcessors: [langfuseSpanProcessor] });
sdk.start();
}import { propagateAttributes } from "@langfuse/tracing";
const result = await propagateAttributes(
{ traceName: "chat-completion", userId, sessionId },
async () =>
streamText({
model: openai("gpt-5.4-nano"),
messages: await convertToModelMessages(messages),
experimental_telemetry: { isEnabled: true },
}),
);LangSmith skips OTel entirely; wrap the ai module instead. convertToModelMessages is not wrapped, so import it from ai directly:
import * as ai from "ai";
import { wrapAISDK } from "langsmith/experimental/vercel";
import { openai } from "@ai-sdk/openai";
const { streamText } = wrapAISDK(ai);
const result = streamText({
model: openai("gpt-5.4-nano"),
messages: await ai.convertToModelMessages(messages),
});
return result.toUIMessageStreamResponse();See the per provider reference files for env vars, metadata tagging, and serverless flushing.
Helicone (proxy, no OTel)
Helicone needs no telemetry flag. Point the provider at the proxy baseURL and pass the auth header:
import { createOpenAI } from "@ai-sdk/openai";
const openai = createOpenAI({
baseURL: "https://oai.helicone.ai/v1",
headers: { "Helicone-Auth": `Bearer ${process.env.HELICONE_API_KEY}` },
});Use this openai instance with streamText as usual; streaming, tools, and attachments are unchanged.
Visualizing spans with react-o11y
@assistant-ui/react-o11y gives headless primitives to render collected spans as a trace waterfall. Feed it SpanData[] (id, parentSpanId, name, type, status, startedAt, endedAt, latencyMs) via SpanResource, mount with useAui, and render SpanPrimitive parts.
npm install @assistant-ui/react-o11yimport { SpanResource, SpanPrimitive, type SpanData } from "@assistant-ui/react-o11y";
import { AuiProvider, useAui } from "@assistant-ui/store";
function SpanRow() {
return (
<SpanPrimitive.Root>
<SpanPrimitive.Indent />
<SpanPrimitive.CollapseToggle />
<SpanPrimitive.StatusIndicator />
<SpanPrimitive.TypeBadge />
<SpanPrimitive.Name />
</SpanPrimitive.Root>
);
}
export function TraceView({ spans }: { spans: SpanData[] }) {
const aui = useAui({ resource: SpanResource({ spans }) });
return (
<AuiProvider value={aui}>
<SpanPrimitive.Children components={{ Span: SpanRow }} />
</AuiProvider>
);
}SpanPrimitive.Children flattens the tree to a visible list and wraps each item in SpanByIndexProvider. Root exposes data-span-status, data-span-type, data-span-depth, and data-collapsed for styling. See react-o11y.md for the full part list and SpanState shape.
Common Gotchas
No traces on Vercel/Lambda
- The function exits before OTel flushes its buffer. Langfuse:
await langfuseSpanProcessor.forceFlush()before responding. LangSmith:await new Client().awaitPendingTraceBatches().
Langfuse traces empty
experimental_telemetry: { isEnabled: true }must be set on eachstreamText/generateTextcall.- The span processor only registers when
process.env.NEXT_RUNTIME === "nodejs"; OTel does not run on the edge runtime.
LangSmith not tracing
- Use the destructured methods from
wrapAISDK(ai), not the originals fromai.LANGSMITH_TRACING=truemust be set.
Helicone requests still hit OpenAI directly
- Confirm requests go to
oai.helicone.ai, notapi.openai.com, and carry bothHelicone-AuthandAuthorizationheaders.
react-o11y renders nothing
- Primitives must render inside
AuiProvider; the resource mounts throughuseAui({ resource: SpanResource({ spans }) }).
Related Skills
/streaming- The route handler and stream response telemetry attaches to/setup- Backend wiring (ai-sdk,custom-backend) where the route lives/cloud- Persistence; pairuserId/sessionId/threadIdwith trace attributes
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

