Skip to content

laguagu/claude-code-nextjs-skills / skills/ai-sdk-7

ai-sdk-7

Verified

Vercel AI SDK v7 development and migration. Use when building or upgrading AI SDK 7 apps, especially ToolLoopAgent, WorkflowAgent, HarnessAgent, Claude Code/Codex/Pi harnesses, runtimeContext, toolsContext, toolApproval, telemetry, reasoning, file or skill uploads, realtime, video generation, or v6-to-v7 breaking changes. For version discovery, v6 code and general doc lookup use ai-sdk.

references/telemetry.md

View on GitHub
---
title: AI SDK 7 Telemetry
description: OpenTelemetry registration, tracing channel, context filtering, and lifecycle events.
---

# Telemetry boundaries

Register a telemetry integration once at app startup. For OpenTelemetry use
`@ai-sdk/otel` with `registerTelemetry`; a Next.js app may register from its
instrumentation entry point.

In v7 telemetry is opt-out once an integration is registered: every call then
emits events, and `telemetry: { isEnabled: false }` is the per-call off switch.
Without a global registration, per-call `telemetry.integrations` and Node.js
`ai:telemetry` tracing-channel subscribers still receive events. Verify input and
output capture settings for the app's data policy: `recordInputs` and
`recordOutputs` default to `true`.

Runtime/tool context is not included automatically; opt in per field with
`telemetry.includeRuntimeContext` / `includeToolsContext`. Filtering is
shallow and affects telemetry only; execution, callbacks and result objects
can still receive full values. Do not treat filtering as redaction everywhere.
Label operations with `telemetry.functionId`; pass additional labels in top-level
`runtimeContext` and explicitly include their fields with
`telemetry.includeRuntimeContext`.

Request/response bodies are excluded by default; opt in with
`include.requestBody` / `include.responseBody` only where needed and safe.
Callback sets differ by core function/agent type. Custom integrations can
subscribe to the `ai:telemetry` diagnostics channel
(`AI_SDK_TELEMETRY_TRACING_CHANNEL`) rather than wrapping each call.

Read `ai/docs/03-ai-sdk-core/60-telemetry.mdx`, installed `@ai-sdk/otel` types and
[telemetry docs](https://ai-sdk.dev/docs/ai-sdk-core/telemetry) for exact capture
defaults and integration options.
reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis.Stars: 472kUpdated Claude CodeCodexVerifiedInstall
diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness.Stars: 322kUpdated Claude CodeCodexVerifiedInstall
dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependenciesStars: 322kUpdated Claude CodeCodexVerifiedInstall
executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is availableStars: 322kUpdated Claude CodeCodexVerifiedInstall