Skip to main content

OpenTelemetry Anthropic instrumentation

Project description

OpenTelemetry Anthropic Instrumentation

This library allows tracing Anthropic prompts and completions sent with the official Anthropic library.

Installation

pip install opentelemetry-instrumentation-anthropic

Example usage

from opentelemetry.instrumentation.anthropic import AnthropicInstrumentor

AnthropicInstrumentor().instrument()

Privacy

By default, this instrumentation logs prompts, completions, and embeddings to span attributes. This gives you a clear visibility into how your LLM application is working, and can make it easy to debug and evaluate the quality of the outputs.

However, you may want to disable this logging for privacy reasons, as they may contain highly sensitive data from your users. You may also simply want to reduce the size of your traces.

To disable logging, set the TRACELOOP_TRACE_CONTENT environment variable to false.

TRACELOOP_TRACE_CONTENT=false

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Built Distribution

File details

Details for the file opentelemetry_instrumentation_anthropic-0.33.12.tar.gz.

File metadata

File hashes

Hashes for opentelemetry_instrumentation_anthropic-0.33.12.tar.gz
Algorithm Hash digest
SHA256 0bc1fd9d4cf2feec4fe9f80c0bdfcbfab33ed9cf0edea850b6c198a8679b01ff
MD5 dd9f6b6b0244548084ad39808be8dd88
BLAKE2b-256 400acba0a6ac1832e3002158b5a9451268aebfe0150c7b8355068d1f2cea148b

See more details on using hashes here.

Provenance

The following attestation bundles were made for opentelemetry_instrumentation_anthropic-0.33.12.tar.gz:

Publisher: release.yml on traceloop/openllmetry

Attestations:

File details

Details for the file opentelemetry_instrumentation_anthropic-0.33.12-py3-none-any.whl.

File metadata

File hashes

Hashes for opentelemetry_instrumentation_anthropic-0.33.12-py3-none-any.whl
Algorithm Hash digest
SHA256 b31618d12a429045db14ed982a142a25df0f0f1dbf03d756e8d597f25b9a053d
MD5 3ec020632a0c17e55b2ef5b00fec5c46
BLAKE2b-256 ba46ba2dc8d18b04acae3d34facd8fe1e5e0cdc9fe64292d45eca9d1d4a8a298

See more details on using hashes here.

Provenance

The following attestation bundles were made for opentelemetry_instrumentation_anthropic-0.33.12-py3-none-any.whl:

Publisher: release.yml on traceloop/openllmetry

Attestations:

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page