Skip to main content

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

Metadata

Release files for tapm-instrumentation-langchain 0.43.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for tapm-instrumentation-langchain 0.43.3
File Interpreter ABI Platform
tapm_instrumentation_langchain-0.43.3-py3-none-any.whl Python 3 none any Details

Release files / tapm_instrumentation_langchain-0.43.3-py3-none-any.whl

Download URL tapm_instrumentation_langchain-0.43.3-py3-none-any.whl
Size 20.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
73566d5a9acb96ddfc70ed79fa9b39ec1a8d7139ace75c0cfff457e499ee711c
BLAKE2b-256 checksum
How to use checksums
53aa154fe762bf6bc1732cf5638b80ee65a7a81fd9ccd4adcbe96f0a71ce1511
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-httpx/0.27.2
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page