Install
Setup
To instrument your application, use theregister function from @arizeai/phoenix-otel and manually instrument the Anthropic SDK.
Create the instrumentation.ts file:
@anthropic-ai/sdk 0.134.0, the Anthropic SDK also records its own traces. With the instrumentation on, every call would appear twice in Phoenix, with tokens and cost counted twice. Pass openTelemetry: false when you create the client, as in the example below, or set ANTHROPIC_OPEN_TELEMETRY=false in your environment.
Run Anthropic
Import theinstrumentation.ts file first, then use Anthropic as usual.

