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 syntrac-opentelemetry-instrumentation-anthropic

Example usage

from syntrac_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 SYNTRAC_TRACE_CONTENT environment variable to false.

SYNTRAC_TRACE_CONTENT=false

Project details


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 syntrac_opentelemetry_instrumentation_anthropic-0.0.2.tar.gz.

File metadata

File hashes

Hashes for syntrac_opentelemetry_instrumentation_anthropic-0.0.2.tar.gz
Algorithm Hash digest
SHA256 772c2330a4e8e5fdfc3bb86400c91af77826137f531bb99c2623f673b8c1899d
MD5 bd8cda26c2b4337f181ccc96b78923a2
BLAKE2b-256 0ffd10a7e736a53d1b5ad5b842719818672abd041df4c3840c8fd86be3793170

See more details on using hashes here.

File details

Details for the file syntrac_opentelemetry_instrumentation_anthropic-0.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for syntrac_opentelemetry_instrumentation_anthropic-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 32976467e10fa54d6e21cb8a94ddf33176c3c87e59a6a4b1fe423222016e4255
MD5 802b9f30131d0a73f0720ffa9ed28d2b
BLAKE2b-256 871d6960dc155a33cf44cd2c0ac7ef1b0239720200642c768f029c200802e6e6

See more details on using hashes here.

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