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

File metadata

File hashes

Hashes for opentelemetry_instrumentation_anthropic-0.33.11.tar.gz
Algorithm Hash digest
SHA256 b4671cec5ef7e8b138c2a3d37a8d99e757fdda1a7c67e0cbc28cfca1928b23bb
MD5 5c9bf611f8fa7ed17233e32ec52c4fa4
BLAKE2b-256 5ef32c1bfdd94d9928dfd935fb31d6dabdb398379179ec8c3becb9347b2430e2

See more details on using hashes here.

Provenance

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

Publisher: release.yml on traceloop/openllmetry

Attestations:

File details

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

File metadata

File hashes

Hashes for opentelemetry_instrumentation_anthropic-0.33.11-py3-none-any.whl
Algorithm Hash digest
SHA256 4e9622fcac4cb4e09bcefe8d6f5cf0776a5e20e073133ebb0b7c4e82f2b0b06a
MD5 a3a8fc7ae8ca4d43eb4a2c6340d99cb6
BLAKE2b-256 a511a17eade909b91c6d0fac82a97849ca970e609c2ac32bc82c7b1f787729cb

See more details on using hashes here.

Provenance

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