LLM Tracing and Observability Setup

LLM Tracing and Observability Setup is a skill for Claude Code, Codex from Notysoty/openagentskills. It costs 48 tokens per session (1,627 once invoked), scanned A, original, MIT.

A setup guide for tracing and monitoring applications that use large language models, using OpenTelemetry and services such as LangSmith, Langfuse, or Helicone.

In plain words
What is it for?
Use it to add trace names and metadata, measure latency, track model costs, and instrument LangChain, LlamaIndex, direct API, or custom applications in Python or TypeScript.
Why use it?
It helps you see which prompt, model response, or tool call caused a failure, delay, or unexpected cost instead of debugging from incomplete logs.

Skill for Claude CodeCodex

Which agent this was written for is unclear — built for cline. Also seen: positional $N argument; mentions Claude Code; mentions Codex.

Good fit Use it to add trace names and metadata, measure latency, track model costs, and instrument LangChain, LlamaIndex, direct API, or custom applications in Python or TypeScript.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/notysoty/openagentskills/llm-tracing-setup
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add Notysoty/openagentskills --skill llm-tracing-setup
Clone the repo
git clone --depth 1 https://github.com/Notysoty/openagentskills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for LLM Tracing and Observability Setup

README.md
[![agentmods](https://agentmods.dev/badge/skills/notysoty/openagentskills/llm-tracing-setup/github.svg)](https://agentmods.dev/skills/notysoty/openagentskills/llm-tracing-setup)
Your own site
<a href="https://agentmods.dev/skills/notysoty/openagentskills/llm-tracing-setup"><img src="https://agentmods.dev/badge/skills/notysoty/openagentskills/llm-tracing-setup/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for LLM Tracing and Observability Setup

Your own site · 80×15
<a href="https://agentmods.dev/skills/notysoty/openagentskills/llm-tracing-setup"><img src="https://agentmods.dev/badge/skills/notysoty/openagentskills/llm-tracing-setup.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 48 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,627 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00048 $0.01627
Opus 5 $0.00024 $0.00813
Sonnet 5 $0.00010 $0.00325
Haiku 4.5 $0.00005 $0.00163

Measured 9d ago against content hash 4f924f210fec, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

LLM Tracing and Observability Setup scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/llm-tracing-setup/SKILL.md · 195 lines

How it starts

The opening of the file, as written. The whole thing — 195 lines — stays where its author put it; the contents beside it link to each section on GitHub.

LLM Tracing and Observability Setup

What this skill does

This skill sets up production-grade observability for LLM applications. Without tracing, debugging a broken LLM pipeline means guessing — you can't see what prompt was sent, what the model returned, which tool call failed, or why latency spiked. This skill configures the right tracing layer for your stack and shows what to instrument.

How to use

Claude Code / Cline

Copy this file to .agents/skills/llm-tracing-setup/SKILL.md in your project root.

Then ask:

  • "Use the LLM Tracing Setup skill to add observability to our LangChain app."
  • "Set up Langfuse tracing for our OpenAI API calls."

Provide:

  • LLM framework in use (LangChain, direct API, LlamaIndex, custom)
  • Preferred tracing backend (LangSmith, Langfuse, Helicone, or open to suggestions)
  • Language (Python or TypeScript)
  • Whether you need cost tracking, latency alerting, or user feedback collection

Cursor / Codex

Paste your LLM call code alongside these instructions and specify the tracing backend.

The Prompt / Instructions for the Agent

Step 1 — Choose a tracing backend

Backend Best for Cost model
LangSmith LangChain / LangGraph apps Free tier + usage
Langfuse Any LLM stack, self-hostable Free tier + open source
Helicone OpenAI / Anthropic direct API Per-request fee
OpenTelemetry + Jaeger Full control, existing OTel infra Self-hosted
Braintrust Eval-heavy teams, prompt versioning Per-event

Recommendation: Langfuse for most teams — framework-agnostic, self-hostable, free tier generous, good UI.

Step 2a — Langfuse setup (any stack)

# pip install langfuse
import os
from langfuse import Langfuse
from langfuse.decorators import observe, langfuse_context

os.environ["LANGFUSE_PUBLIC_KEY"] = "pk-lf-..."
os.environ["LANGFUSE_SECRET_KEY"] = "sk-lf-..."
os.environ["LANGFUSE_HOST"] = "https://cloud.langfuse.com"

langfuse = Langfuse()

# Decorate any function that calls an LLM
@observe()
def generate_response(user_query: str) -> str:
    # Automatically traces: input, output, latency, model
    response = openai_client.chat.completions.create(
        model="gpt-4o-mini",
        messages=[{"role": "user", "content": user_query}]
    )
    return response.choices[0].message.content

# Add custom metadata
@observe()
def process_document(doc_id: str, query: str) -> str:
    langfuse_context.update_current_observation(
        metadata={"doc_id": doc_id, "pipeline_version": "v2.1"},
        tags=["document-qa", "production"]
    )
    return generate_response(query)

Read the full file on GitHub · 195 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 195 lines · 48 tokens per session scan A 4f924f210fec

Subscribe to this mod's changes

LLM Tracing and Observability Setup is a skill published in the GitHub repository Notysoty/openagentskills (9 stars, last pushed 25d ago), licensed MIT. It adds 48 tokens to every session and 1,627 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

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.

davila7/claude-code-templates · 45 tokens

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.

synthetic-sciences/openscience · 45 tokens

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.

OpenLAIR/dr-claw · 45 tokens

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.

Orchestra-Research/AI-Research-SKILLs · 45 tokens

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.

liortesta/ClawdAgent · 45 tokens

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.

OpenLAIR/dr-claw-plugin-cc · 45 tokens