This module provides automatic instrumentation for the Anthropic SDK TypeScript, which may be used in conjunction with @arizeai/phoenix-otel.
Install#
Setup#
To instrument your application, use the register function from @arizeai/phoenix-otel and manually instrument the Anthropic SDK.
Create the instrumentation.ts file:
Run Anthropic#
Import the instrumentation.ts file first, then use Anthropic as usual.
Observe#
After setting up instrumentation and running your Anthropic application, traces will appear in the Phoenix UI for visualization and analysis.
Custom Tracer Provider#
You can specify a custom tracer provider for Anthropic instrumentation:

