langchain-observability

Featured

Set up comprehensive observability for LangChain applications with LangSmith tracing, OpenTelemetry, Prometheus metrics, and alerts. Trigger: "langchain monitoring", "langchain metrics", "langchain observability", "langchain tracing", "LangSmith", "langchain alerts".

AI & Automation 2,266 stars 315 forks Updated today MIT

Install

View on GitHub

Quality Score: 99/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# LangChain Observability ## Overview Production observability for LangChain: LangSmith tracing (zero-code), custom Prometheus metrics, OpenTelemetry integration, structured logging, and Grafana dashboards. ## Tier 1: LangSmith Tracing (Zero-Code Setup) LangSmith automatically traces all LangChain calls when env vars are set. ```bash # Add to .env — that's it. No code changes needed. LANGSMITH_TRACING=true LANGSMITH_API_KEY=lsv2_pt_... LANGSMITH_PROJECT=my-app-production # Optional: background callbacks for lower latency (non-serverless) LANGCHAIN_CALLBACKS_BACKGROUND=true ``` Every chain, LLM call, tool invocation, and retriever query is automatically traced with: - Input/output payloads - Token usage and cost - Latency per step - Error details with stack traces - Parent-child run relationships ### Query Traces Programmatically ```typescript import { Client } from "langsmith"; const client = new Client(); // Get recent failed runs const failedRuns = client.listRuns({ projectName: "my-app-production", error: true, limit: 10, }); for await (const run of failedRuns) { console.log(`${run.name}: ${run.error} (${run.totalTokens} tokens)`); } ``` ## Tier 2: Custom Metrics Callback ```typescript import { BaseCallbackHandler } from "@langchain/core/callbacks/base"; interface Metrics { totalRequests: number; totalErrors: number; totalTokens: number; latencies: number[]; } class MetricsCallback extends BaseCallbackHandler { name = "MetricsCallback"; ...

Details

Author
jeremylongshore
Repository
jeremylongshore/claude-code-plugins-plus-skills
Created
7 months ago
Last Updated
today
Language
Python
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category

AI & Automation Solid

langsmith-tracing

LangSmith tracing and debugging setup for LLM applications. Configure observability, capture traces, and enable debugging for LangChain/LangGraph agents.

1,034 Updated today
a5c-ai
AI & Automation Featured

langsmith-observability

LLM observability platform for tracing, evaluation, and monitoring. Use when debugging LLM applications, evaluating model outputs against datasets, monitoring production systems, or building systematic testing pipelines for AI applications.

27,681 Updated today
davila7
AI & Automation Solid

langsmith-observability

LLM observability platform for tracing, evaluation, and monitoring. Use when debugging LLM applications, evaluating model outputs against datasets, monitoring production systems, or building systematic testing pipelines for AI applications.

9,117 Updated 1 months ago
Orchestra-Research
AI & Automation Featured

langchain-prod-checklist

Production readiness checklist for LangChain applications. Use when preparing for launch, validating deployment readiness, or auditing existing production LangChain systems. Trigger: "langchain production", "langchain prod ready", "deploy langchain", "langchain launch checklist", "go-live langchain".

2,266 Updated today
jeremylongshore
AI & Automation Featured

langchain-performance-tuning

Optimize LangChain application performance: latency, throughput, streaming, caching, batch processing, and connection pooling. Trigger: "langchain performance", "langchain optimization", "langchain latency", "langchain slow", "speed up langchain".

2,266 Updated today
jeremylongshore