llm-call-tracing

Trace LLM API calls to capture model, latency, tokens, cost, and success status.

7|1|Updated Dec 26, 2025
One-click install
npx skills add https://github.com/nexus-labs-automation/agent-observability --skill llm-call-tracing
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: llm-call-tracing
Source: https://github.com/nexus-labs-automation/agent-observability/tree/main/skills/llm-call-tracing
Command: npx skills add https://github.com/nexus-labs-automation/agent-observability --skill llm-call-tracing

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Instrument LLM API calls to capture model, latency, tokens, costs, and outcomes.

Core Features & Use Cases

  • Structured telemetry: capture model, latency, token counts, cost, and success/failure for every call.
  • Framework & SDK integration: works with direct SDKs, LangChain, and multi-agent tool usage to provide end-to-end observability.
  • Cost-aware tracing & streaming: supports token-based cost accounting and streaming telemetry when supported by the backend.

Quick Start

Instrument a single LLM API call to capture model, latency, tokens, costs, and outcome.

Frequently Asked Questions about llm-call-tracing

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

FAQPage Schema
How do I trace LLM API calls to capture latency and token usage?

To trace LLM API calls and capture latency and tokens, you instrument direct SDK invocations with structured span attributes that log model details, execution time, and success status for production observability.

Does LLM tracing work with LangChain integrations and multi-agent tool usage?

LLM tracing supports LangChain integrations and multi-agent tool usage scenarios, providing end-to-end observability across complex workflows by logging structured telemetry for every underlying model interaction.

Can I track token costs and success status for LLM calls in production?

You can track token costs and success status for LLM calls in production using cost-aware tracing, which implements token-based cost accounting and structured error context for failed invocations.

What is the best way to instrument streaming LLM responses for observability?

The best way to instrument streaming LLM responses for observability is to use optional streaming support features that capture telemetry data progressively as the backend generates the output.

How do I capture error context when an LLM API call fails?

To capture error context when an LLM API call fails, you implement structured span attributes that record the failure outcome and surrounding invocation details, ensuring production instrumentation meets observability requirements.