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

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file opentelemetry_instrumentation_anthropic-0.13.3.tar.gz.

File metadata

File hashes

Hashes for opentelemetry_instrumentation_anthropic-0.13.3.tar.gz
Algorithm Hash digest
SHA256 fb2a9855d9fdf3f7149297104bebb63f685c5b5451c9dc664bd3972624f8da27
MD5 690bb6c537fdf2c2496d76550e6b7f95
BLAKE2b-256 504e0a090f53eff85ec158fdbaee5274b48ccaa7f0dcfceb3e90f99455bb34c7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for opentelemetry_instrumentation_anthropic-0.13.3-py3-none-any.whl
Algorithm Hash digest
SHA256 0393ac6ed62f2cfa1cb3f42bed9533e8c8c92112e0ab1a1ffa82c2b204eadbc4
MD5 18e764a2b17bb3a3434b434c70b0dc8a
BLAKE2b-256 3d763dddba3534526d34c2e73f595bd7e532fc79642fbbdab973607afdb0e29f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page