tracing-setup

tracing-setup is a skill for Claude Code, Codex from orlando-japan/claude-code-setting. It costs 35 tokens per session (843 once invoked), scanned A, original, MIT.

Instructions for adding distributed tracing to a service. Distributed tracing records a request as it moves through several services, databases, or background tasks.

In plain words
What is it for?
Setting up OpenTelemetry tracing, connecting trace information across service boundaries, adding request and database spans, choosing a tracing backend, and controlling sampling.
Why use it?
It helps show where a request spent time and which service or operation caused a delay, beyond what separate logs and metrics can reveal.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/orlando-japan/claude-code-setting/tracing-setup
Any agent
npx skills add orlando-japan/claude-code-setting --skill tracing-setup
Clone the repo
git clone --depth 1 https://github.com/orlando-japan/claude-code-setting

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 tracing-setup

README.md
[![agentmods](https://agentmods.dev/badge/skills/orlando-japan/claude-code-setting/tracing-setup.svg)](https://agentmods.dev/skills/orlando-japan/claude-code-setting/tracing-setup)
Your own site
<a href="https://agentmods.dev/skills/orlando-japan/claude-code-setting/tracing-setup"><img src="https://agentmods.dev/badge/skills/orlando-japan/claude-code-setting/tracing-setup.svg" alt="Measured on agentmods" height="20"></a>
Per session 35 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 843 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00035 $0.00843
Opus 5 $0.00017 $0.00421
Sonnet 5 $0.00007 $0.00169
Haiku 4.5 $0.00003 $0.00084

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

Security

Grade A, and why

tracing-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 4d 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.

templates/extra/skills/tracing-setup/SKILL.md · 79 lines

How it starts

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

Tracing setup

Metrics answer "is it slow?" Logs answer "what happened at this point?" Traces answer "where did my request spend its time?" — across services, async boundaries, and databases.

The model

A trace is a tree of spans. A span represents a unit of work: a request, a DB query, an external call. Each span has:

  • A name ("http POST /orders")
  • Start and end timestamps
  • A parent span (or root)
  • Key-value attributes (user_id, status code, query shape)
  • Events and errors attached

The trace ID propagates across service boundaries (usually via a header: traceparent in W3C trace context).

Minimum viable tracing

  1. Pick a backend. Jaeger, Tempo, Honeycomb, Datadog, Lightstep. All support OpenTelemetry.
  2. Use OpenTelemetry. Vendor lock-in on tracing protocols is expensive to unwind. OTel is the standard.
  3. Auto-instrument what you can. Most HTTP servers, DB drivers, and HTTP clients have OTel auto-instrumentation that creates spans for free.
  4. Propagate trace context across service boundaries. The HTTP client and server both need to handle the traceparent header.
  5. Sample. 100% sampling is too expensive in production. 1–10% head-based or tail-based sampling is typical.

What to span

  • Incoming requests (auto).
  • Outgoing HTTP calls (auto).
  • DB queries (auto, via instrumented driver).
  • Async work — jobs, background tasks (usually manual).
  • Expensive computation (manual) — anything you want to see the duration of.

Don't span every function call. Traces get unreadable, storage gets expensive.

Span attributes

Attach context so you can filter traces later:

  • user_id (with PII rules — hash or omit if sensitive)
  • request_id
  • route (the matched route, not the literal URL with IDs)
  • db.statement (parameterized, not the raw query with values)
  • error.kind on failed spans

Cardinality rules: same as metrics labels. Avoid per-request-unique values in attributes you'll want to aggregate.

Read the full file on GitHub · 79 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. 4d ago First seen · 79 lines · 35 tokens per session scan A a97c2245ddbc

Subscribe to this mod's changes

tracing-setup is a skill published in the GitHub repository orlando-japan/claude-code-setting (2 stars, last pushed 3mo ago), licensed MIT. It adds 35 tokens to every session and 843 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

phoenix-observability

Open-source AI observability platform for LLM tracing, evaluation, and monitoring. Use when debugging LLM applications with detailed traces, running evaluations on datasets, or monitoring production AI systems with real-time insights.

davila7/claude-code-templates · 47 tokens

opentelemetry-net-instrumentation

Provides guidance for implementing OpenTelemetry instrumentation in .NET codebases, covering tracing (Activities/Spans), metrics, logs, naming conventions, error handling, performance, SDK setup, resources, context propagation, and API design best practices.

Aaronontheweb/dotnet-skills · 56 tokens

frontmcp-observability

Use when adding tracing, structured logging, metrics, or monitoring to a FrontMCP server. Covers zero-config OpenTelemetry distributed tracing across all flows; the this.telemetry API for custom spans, events, and attributes in tools, plugins, agents, and skills; structured JSON logging with trace correlation and…

agentfront/frontmcp · 177 tokens

observability

Use when instrumenting a service from the inside so an incident can be explained from telemetry alone — wiring OpenTelemetry logs, metrics and traces, standing up a Collector, exporting via OTLP, and defining telemetry-driven alerts. NOT outside-in uptime probes, on-call rotation, or who-gets-paged (that is…

ericrisco/rsc-harness · 70 tokens

golang-observability-opentelemetry

Instrumenting Go applications with OpenTelemetry for distributed tracing, Prometheus for metrics, and structured logging with slog.

bobmatnyc/claude-mpm-skills · 31 tokens

phoenix-observability

Open-source AI observability platform for LLM tracing, evaluation, and monitoring. Use when debugging LLM applications with detailed traces, running evaluations on datasets, or monitoring production AI systems with real-time insights.

OpenLAIR/dr-claw · 47 tokens