Skip to main content
wrapClaudeAgentSdk<T>(sdk): T
Defined in: src/integrations/claudeAgentSdk.ts:209 Manually instrument the @anthropic-ai/claude-agent-sdk module. Reach for this when automatic instrumentation doesn’t apply — e.g. a bundler whose module loading the CJS/ESM hooks can’t observe, or an import path they don’t cover. Requires @anthropic-ai/claude-agent-sdk >= 0.3.178. Returns a view of the module whose query export is traced; use the returned object rather than the original import (the SDK’s query is a getter-only export, so the original binding can’t be patched in place):

Type Parameters

T

T

Parameters

sdk

T

Returns

T

Example