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

File metadata

File hashes

Hashes for opentelemetry_instrumentation_langchain-0.33.12.tar.gz
Algorithm Hash digest
SHA256 ff607742c76a1844211648415fa35da9eac22a42da2a9732c673bd13f2973994
MD5 bbce06005e8e2f1f8eb768abd69222f3
BLAKE2b-256 73604fb638bc69cc63bbf7aad81a08650c99bd343a67f49c532261190e7ee7e4

See more details on using hashes here.

Provenance

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

Publisher: release.yml on traceloop/openllmetry

Attestations:

File details

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

File metadata

File hashes

Hashes for opentelemetry_instrumentation_langchain-0.33.12-py3-none-any.whl
Algorithm Hash digest
SHA256 7406ab7116fa43343f53602f7b530f9bb1552e20ad750dbfc5aa1761c027c2d3
MD5 6ea08036e4c31b2ca23fdfa7d201cf5f
BLAKE2b-256 b1fe215a5b5b52360c94b2223f4dfb339665a60838d8f53edd37dd1c40897de4

See more details on using hashes here.

Provenance

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

Publisher: release.yml on traceloop/openllmetry

Attestations:

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