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.7.tar.gz.

File metadata

File hashes

Hashes for opentelemetry_instrumentation_anthropic-0.33.7.tar.gz
Algorithm Hash digest
SHA256 4a76f1a97a9d075685c453bf4a5aaf11c1a0eb9307a4aecd71ff0d2cc661d8b4
MD5 097a73476df2695657b0d375bba2e14f
BLAKE2b-256 7eef33d79565c48ec1b134b1dc45f636cd098c94a8d65ef543e60d1753837ce3

See more details on using hashes here.

Provenance

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

Publisher: release.yml on traceloop/openllmetry

Attestations:

File details

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

File metadata

File hashes

Hashes for opentelemetry_instrumentation_anthropic-0.33.7-py3-none-any.whl
Algorithm Hash digest
SHA256 152c13ae54a8d2b04203143716b88410ad479f82ddd07783d44686d0bb6eb2de
MD5 068737d1d020e33d40384cf4bd471765
BLAKE2b-256 87b07e30942add8be553fe1b2b67360ef552e54a4fc85c56a3bdb228518505c1

See more details on using hashes here.

Provenance

The following attestation bundles were made for opentelemetry_instrumentation_anthropic-0.33.7-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