langsmith-trace

Instrument applications and export trace data via the LangSmith CLI.

113|9|Updated Jan 24, 2026
One-click install
npx skills add https://github.com/langchain-ai/skills-benchmarks --skill langsmith-trace
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: langsmith-trace
Source: https://github.com/langchain-ai/skills-benchmarks/tree/main/skills/main/langsmith-trace
Command: npx skills add https://github.com/langchain-ai/skills-benchmarks --skill langsmith-trace

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

LangSmith tracing provides a unified way to instrument applications, collect trace data, and analyze performance and debugging information via traces and runs.

Core Features & Use Cases

  • Automatic tracing for LangChain/LangGraph apps and support for manual tracing wrappers.
  • Querying, exporting, and analyzing traces using the LangSmith CLI to build datasets and insights.
  • Use case: diagnose latency bottlenecks in a LangChain agent by tracing calls and exporting traces for inspection.

Quick Start

Install the LangSmith CLI and enable tracing in your app to begin collecting traces.

Frequently Asked Questions about langsmith-trace

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add tracing to a LangChain application to debug latency bottlenecks?

To add tracing to a LangChain application, you can use LangSmith's automatic instrumentation to collect trace data and diagnose latency bottlenecks. It requires setting the LANGSMITH_API_KEY and optionally LANGSMITH_PROJECT to record runs for debugging.

Can I instrument tracing for generic Python code, or does it only work with LangGraph apps?

Tracing works with both LangChain and LangGraph apps as well as generic code. You can use automatic tracing for LangChain apps or apply manual trace wrappers to instrument generic code and collect performance analysis data.

How do I query and export trace data using the LangSmith CLI?

You can query and export trace data using the LangSmith CLI to build datasets and gather insights. After installing the CLI and enabling tracing in your app, use the CLI commands to record, query, and export traces for inspection.

What environment variables do I need to set up to start collecting application traces?

You need to set the LANGSMITH_API_KEY environment variable to authenticate and start collecting application traces. You can also optionally set LANGSMITH_PROJECT to specify where the trace data and runs are recorded.

Why use manual trace wrappers instead of automatic tracing for application instrumentation?

Automatic tracing instruments LangChain apps directly, while manual trace wrappers provide granular control for generic code. Manual wrappers let you target specific functions for trace data collection, whereas automatic tracing captures the entire application flow.