OpenInference Anthropic Instrumentation
Actively maintained. Last release 10 days ago, commits in 26 of the last 26 weeks. A safe choice.
pip install openinference-instrumentation-anthropicOpenInference Anthropic Instrumentation
Python autoinstrumentation library for the Anthropic package
This package implements the following Anthropic clients:
Messages(create,stream,parse,count_tokens)AsyncMessages- Beta
MessagesandAsyncMessages, including those of the Bedrock and Vertex AI clients
llm.provider is the platform hosting the model: aws for Bedrock, google for Vertex AI,
azure for Microsoft Foundry, and anthropic otherwise.
These traces are fully OpenTelemetry compatible and can be sent to an OpenTelemetry collector for viewing, such as Arize Phoenix or Arize AX.
Compatibility
openinference-instrumentation-anthropic | anthropic | Python |
|---|---|---|
>=3.2.0 | >=1.8.0 | >=3.10, <3.16 |
>=3.0.0, <3.2.0 | >=1.8.0 | >=3.10, <3.15 |
>=2.1.6, <3.0.0 | >=1.0.0 | >=3.10, <3.15 |
2.1.5 | >=1.0.0, <1.8 | >=3.10, <3.15 |
>=2.0, <2.1.5 | >=1.0.0, <1.5 | >=3.10, <3.15 |
>=1.0.1, <2.0 | >=0.84.0, <1.0 | >=3.10, <3.15 |
1.0.0 | >=0.84.0, <1.0 | >=3.9, <3.15 |
Anthropic 1.0 removed the legacy Text Completions API. Instrumentor 2.0 therefore
requires anthropic>=1.0.0 and instruments the Messages and Beta Messages APIs.
See Anthropic's
for the upstream breaking changes.