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

File metadata

File hashes

Hashes for opentelemetry_instrumentation_anthropic-0.33.10.tar.gz
Algorithm Hash digest
SHA256 a11b9afb0800c3e7d53eb07582e4c42681dbfde1c4bf5a452c216f062ad81b72
MD5 a2a5615e2a1c4ca18845befcf91d14da
BLAKE2b-256 73d0645df6e68d216c4db54516e4a800fdb355bd6cccd8309c74339d6008fbc8

See more details on using hashes here.

Provenance

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

Publisher: release.yml on traceloop/openllmetry

Attestations:

File details

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

File metadata

File hashes

Hashes for opentelemetry_instrumentation_anthropic-0.33.10-py3-none-any.whl
Algorithm Hash digest
SHA256 8ee9073825f476a37776078f68cfe6c1a850571f4baa8f7c2d8ec3d06b6f4ed8
MD5 f4ef19e2f91c74da12dd6263a25e31cf
BLAKE2b-256 300a5a1c98dcf4cd470e9110ad9c5ea5fb274d5928c656a1a313f430bee40491

See more details on using hashes here.

Provenance

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