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

File metadata

File hashes

Hashes for opentelemetry_instrumentation_anthropic-0.33.5.tar.gz
Algorithm Hash digest
SHA256 a7856cd47926b61b2fa722e1a5f30612fed23863a5211c156feda483c294a5eb
MD5 8c1d24e232077ffb225fe605d14d6297
BLAKE2b-256 25cf2d8416f7a0de5e46d058f859622bff2207569d15164e1ada68acbb686a38

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for opentelemetry_instrumentation_anthropic-0.33.5-py3-none-any.whl
Algorithm Hash digest
SHA256 3e94d6293c28e805957a5c665bfabb7b4a5165b50dee7e6940b1b3606598cc09
MD5 c9538bf396b25decbfb15cca02e01395
BLAKE2b-256 8c368711036bfb831344fd2db819616cfff1533105812e9e1ee43e0b25a8eb1a

See more details on using hashes here.

Provenance

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