Skip to main content

OpenTelemetry Langchain instrumentation

Project description

OpenTelemetry Langchain Instrumentation

This library allows tracing complete LLM applications built with Langchain.

Installation

pip install opentelemetry-instrumentation-langchain

Example usage

from opentelemetry.instrumentation.langchain import LangchainInstrumentor

LangchainInstrumentor().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_langchain-0.20.0.tar.gz.

File metadata

File hashes

Hashes for opentelemetry_instrumentation_langchain-0.20.0.tar.gz
Algorithm Hash digest
SHA256 17a67a57b683bd0d0e4cb0ba27f13833b5f7d4ca531efced8066a588dd324682
MD5 8ac151e4ae1fa13276f9234017e54f00
BLAKE2b-256 dd62a912ff717629f6c5b028faa21ae1b6135edaa4db7ea76a228dc279cd246d

See more details on using hashes here.

File details

Details for the file opentelemetry_instrumentation_langchain-0.20.0-py3-none-any.whl.

File metadata

File hashes

Hashes for opentelemetry_instrumentation_langchain-0.20.0-py3-none-any.whl
Algorithm Hash digest
SHA256 022d0c7d144243380917a606d0ab83ceef93b10b30823eef867a7a89ea74afc3
MD5 0c8b6dfab3d165aa696f77e6baa40ead
BLAKE2b-256 b2db5ab60c9f30acbc9a06340756e30a667a47e9f9ba74241d6bd1a869abcd53

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