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

Example usage

from syntrac_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 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_langchain-0.0.4.tar.gz.

File metadata

File hashes

Hashes for syntrac_opentelemetry_instrumentation_langchain-0.0.4.tar.gz
Algorithm Hash digest
SHA256 5c1a7bbd7f1a03101ea1526dcc103ae3b1f06f560b730876c9b0a76f72716bac
MD5 0b542846174d4186b68128f53fc7087e
BLAKE2b-256 54a4e9707967d446564a37125924c778b57867c5d5421e98cc2168ce2b631198

See more details on using hashes here.

File details

Details for the file syntrac_opentelemetry_instrumentation_langchain-0.0.4-py3-none-any.whl.

File metadata

File hashes

Hashes for syntrac_opentelemetry_instrumentation_langchain-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 b0785999b4b76cdd5bd35398c3066f660f2a554a8601de3201d6a7065b17eee8
MD5 6b4a81fab79d934fae73297d5a82513e
BLAKE2b-256 c72941239cd99c40b2d14c41d1b47c41154059a4d8581c1ea09497cb217830ee

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