Skip to main content

langchain-instrumentation

OpenTelemetry instrumentation SDK for LangChain and LangGraph.

Install

pip install langchain-instrumentation

Quickstart

from langchain_instrumentation import LangChainConfig, LangChainInstrumentor

instrumentor = LangChainInstrumentor(LangChainConfig())
instrumentor.instrument()

# Optional manual handler injection in custom callback manager flows
handler = instrumentor.handler

# Shutdown or test cleanup
instrumentor.uninstrument()

What it instruments

  • LangChain callback lifecycle spans
  • Optional LangGraph tracing hooks
  • Optional agent factory tracing hooks
  • Metrics and structured log emission

Configuration

LangChainConfig controls behavior. Most-used flags:

  • emit_metrics, emit_logs
  • patch_callback_manager, patch_langgraph, patch_langchain_factories
  • record_content, record_raw_payloads, redact_keys

Metadata

Release files for langchain-instrumentation 0.1.0

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

Source distribution (sdist)

Source distribution for langchain-instrumentation 0.1.0
File Size Uploaded
langchain_instrumentation-0.1.0.tar.gz 27.4 kB Details

Built distribution (wheel)

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

Total release size: 59.8 kB

Release files / langchain_instrumentation-0.1.0.tar.gz

Download URL langchain_instrumentation-0.1.0.tar.gz
Size 27.4 kB
Tags Source
SHA-256 checksum
How to use checksums
b7d53ff8b4293f212933fe7d20d83d0a3f8921cd4cb2ec19dd577a72b6c65e26
BLAKE2b-256 checksum
How to use checksums
b08e2019993a88d566a0d8f89dfad4e0b7027db32941578d84767f64cf4abfd4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 31, 2026.

Transparency log

Release files / langchain_instrumentation-0.1.0-py3-none-any.whl

Download URL langchain_instrumentation-0.1.0-py3-none-any.whl
Size 32.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
320603d15b134956bd0d5403f1a3cd39cdc35f51234525f980e5059b93e59b85
BLAKE2b-256 checksum
How to use checksums
d5273a4ee31215bb6a19bb709c578bdef13b9c5460eaa75d94fee539ffbbd956
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 31, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

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