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

File metadata

File hashes

Hashes for opentelemetry_instrumentation_anthropic-0.33.4.tar.gz
Algorithm Hash digest
SHA256 b4244361d32e0a22c87e277363cd41492e31573979aa9c2f591011e2fed122c4
MD5 0612a9e0b8273b4a38b6b136c4b07786
BLAKE2b-256 19174cfcfa0847a1f9c51163f5884b1ae5157f68a4abffc7a12329259b3fe4f3

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for opentelemetry_instrumentation_anthropic-0.33.4-py3-none-any.whl
Algorithm Hash digest
SHA256 4b318a9ab86524c1c9a3ed1623439fb9c5ee469983c0082236c0bda3a67e62df
MD5 b8ba0bb7e7aa72bf0c65cf43bacf121a
BLAKE2b-256 f73ea7c0ec5c2fd70f4ae5a02bdf69d2c45e75b3e375e4750df1912d4f58f863

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