distributed-tracing

distributed-tracing is a skill for Claude Code, Codex from sawrus/agent-guides. It costs 53 tokens per session (1,257 once invoked), scanned A, original, MIT.

A guide to distributed tracing, which follows one request across multiple services using connected timing records called traces and spans. It covers OpenTelemetry, trace collection, sampling, and linking traces with logs and metrics.

In plain words
What is it for?
Use it to add tracing to services, instrument requests, configure an OpenTelemetry Collector, verify traces in Tempo or Jaeger, correlate logs, and tune sampling.
Why use it?
It helps locate slow or failed work that crosses service boundaries and connect the request path to the relevant log entries.

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/sawrus/agent-guides/distributed-tracing
Any agent
npx skills add sawrus/agent-guides --skill distributed-tracing
Clone the repo
git clone --depth 1 https://github.com/sawrus/agent-guides

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/sawrus/agent-guides/distributed-tracing.svg)](https://agentmods.dev/skills/sawrus/agent-guides/distributed-tracing)
Your own site
<a href="https://agentmods.dev/skills/sawrus/agent-guides/distributed-tracing"><img src="https://agentmods.dev/badge/skills/sawrus/agent-guides/distributed-tracing.svg" alt="Measured on agentmods" height="20"></a>
Per session 53 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,257 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. 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.00053 $0.01257
Opus 5 $0.00026 $0.00629
Sonnet 5 $0.00011 $0.00251
Haiku 4.5 $0.00005 $0.00126

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

Security

Grade A, and why

distributed-tracing scanned grade A with 1 finding 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 5d 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

3. **Verify traces** — confirm traces appear in Tempo/Jaeger: `curl -s http://tempo:3200/api/search?q={}&limit=5`
areas/devops/observability/skills/distributed-tracing/SKILL.md · 159 lines

How it starts

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

Skill: Distributed Tracing

Expertise: OpenTelemetry SDK, auto-instrumentation, Tempo/Jaeger, trace-log correlation, sampling strategies.

When to load

When adding tracing to a service, debugging slow distributed transactions, or setting up trace → log → metric correlation.

End-to-End Setup Workflow

  1. Deploy collector — configure and deploy the OTel Collector as a DaemonSet (see config below)
  2. Instrument service — add SDK initialization and auto-instrumentation for your framework (Python/Go examples below)
  3. Verify traces — confirm traces appear in Tempo/Jaeger: curl -s http://tempo:3200/api/search?q={}&limit=5
  4. Add log correlation — inject trace_id and span_id into log lines for Loki/Grafana linkage
  5. Validate linkage — click a trace in Grafana → Explore → verify it links to the corresponding log entries
  6. Tune sampling — apply tail-based sampling policies for errors and slow traces (see strategy table)

OpenTelemetry Collector (K8s DaemonSet)

# otel-collector-config.yaml
receivers:
  otlp:
    protocols:
      grpc: { endpoint: "0.0.0.0:4317" }
      http: { endpoint: "0.0.0.0:4318" }

processors:
  batch:
    timeout: 1s
    send_batch_size: 1000
  memory_limiter:
    check_interval: 1s
    limit_mib: 400

  # Tail-based sampling — sample 100% of error/slow traces
  tail_sampling:
    decision_wait: 10s
    policies:
      - name: errors-policy
        type: status_code
        status_code: { status_codes: [ERROR] }
      - name: slow-traces
        type: latency
        latency: { threshold_ms: 500 }
      - name: probabilistic-10pct
        type: probabilistic
        probabilistic: { sampling_percentage: 10 }

exporters:
  otlp/tempo:
    endpoint: tempo:4317
    tls: { insecure: true }

service:
  pipelines:
    traces:
      receivers: [otlp]
      processors: [memory_limiter, tail_sampling, batch]
      exporters: [otlp/tempo]

Python Auto-Instrumentation (FastAPI)

# main.py — add before app creation
from opentelemetry import trace
from opentelemetry.sdk.trace import TracerProvider
from opentelemetry.sdk.trace.export import BatchSpanProcessor
from opentelemetry.exporter.otlp.proto.grpc.trace_exporter import OTLPSpanExporter
from opentelemetry.instrumentation.fastapi import FastAPIInstrumentor
from opentelemetry.instrumentation.httpx import HTTPXClientInstrumentor
from opentelemetry.instrumentation.sqlalchemy import SQLAlchemyInstrumentor

provider = TracerProvider()
provider.add_span_processor(
    BatchSpanProcessor(OTLPSpanExporter(endpoint="otel-collector:4317"))
)
trace.set_tracer_provider(provider)

# Auto-instrument frameworks
FastAPIInstrumentor.instrument_app(app)
HTTPXClientInstrumentor().instrument()  # outgoing HTTP calls
SQLAlchemyInstrumentor().instrument()   # DB queries

Read the full file on GitHub · 159 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. 5d ago First seen · 159 lines · 53 tokens per session scan A 9e507318d089

Subscribe to this mod's changes

distributed-tracing is a skill published in the GitHub repository sawrus/agent-guides (17 stars, last pushed 4d ago), licensed MIT. It adds 53 tokens to every session and 1,257 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

shipping-and-launch

Prepares production launches. Use when preparing to deploy to production. Use when you need a pre-launch checklist, when setting up monitoring, when planning a staged rollout, or when you need a rollback strategy.

addyosmani/agent-skills · 45 tokens

aegisops-ai

Autonomous DevSecOps & FinOps Guardrails. Orchestrates Gemini 3 Flash to audit Linux Kernel patches, Terraform cost drifts, and K8s compliance.

sickn33/agentic-awesome-skills · 41 tokens

aws-advisor

Expert AWS Cloud Advisor for architecture design, security review, and implementation guidance. Leverages AWS MCP tools for accurate, documentation-backed answers. Use when user asks about AWS architecture, security, service selection, migrations, troubleshooting, or learning AWS. Triggers on AWS, Lambda, S3, EC2…

tech-leads-club/agent-skills · 118 tokens

cloudflare-deploy

Deploy applications and infrastructure to Cloudflare using Workers, Pages, and related platform services. Use when the user asks to deploy, host, publish, or set up a project on Cloudflare. Do NOT use for deploying to Vercel, Netlify, or Render (use their respective skills).

tech-leads-club/agent-skills · 64 tokens

netlify-deploy

Deploy web projects to Netlify using the Netlify CLI (npx netlify). Use when the user asks to deploy, host, publish, or link a site/repo on Netlify, including preview and production deploys. Do NOT use for deploying to Vercel, Cloudflare, or Render (use their respective skills).

tech-leads-club/agent-skills · 72 tokens

vercel-deploy

Deploy applications and websites to Vercel. Use when the user requests deployment actions like "deploy my app", "deploy and give me the link", "push this live", or "create a preview deployment". Do NOT use for deploying to Netlify, Cloudflare, or Render (use their respective skills).

tech-leads-club/agent-skills · 67 tokens