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

File metadata

File hashes

Hashes for opentelemetry_instrumentation_langchain-0.40.14.tar.gz
Algorithm Hash digest
SHA256 a196eef6990b98fc67acca945883e39fbdaf075f8a36636e7a9e580092f7c3ea
MD5 99922cd32a653e834d5f890c620d7a8a
BLAKE2b-256 7b9f7ecf1a46a3456e830cc0bc67f25f3c6a5fbdd6731c0cd51918dbe11ac506

See more details on using hashes here.

Provenance

The following attestation bundles were made for opentelemetry_instrumentation_langchain-0.40.14.tar.gz:

Publisher: release.yml on traceloop/openllmetry

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

File hashes

Hashes for opentelemetry_instrumentation_langchain-0.40.14-py3-none-any.whl
Algorithm Hash digest
SHA256 f400d25b1c5fb03fcaabae40970a7980d9c45d2b22e0ceeb99ce62b7b3d3c6e2
MD5 1408983db6afeabf42b2bdad71e5f0bc
BLAKE2b-256 2e60c86cd2030704fb27b9251e42e39f7ea5902c8fa1f00a708ef6030cffa8b4

See more details on using hashes here.

Provenance

The following attestation bundles were made for opentelemetry_instrumentation_langchain-0.40.14-py3-none-any.whl:

Publisher: release.yml on traceloop/openllmetry

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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