instrument-tracing

instrument-tracing is a skill for Claude Code, Codex from PostHog/skills. It costs 72 tokens per session (2,928 once invoked), scanned A, original, MIT.

A coding guide for adding distributed tracing with PostHog and OpenTelemetry. Distributed tracing records a request as it moves through services, outside calls, and background jobs, showing where time is spent.

In plain words
What is it for?
Use it to add or update tracing in Node.js, Python, Go, Java, .NET, PHP, Ruby, or other OpenTelemetry-supported applications.
Why use it?
It helps locate slow steps and follow a request across multiple parts of an application instead of investigating each service separately.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to add or update tracing in Node.js, Python, Go, Java, .NET, PHP, Ruby, or other OpenTelemetry-supported applications.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/posthog/skills/instrument-tracing
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 PostHog/skills --skill instrument-tracing
Clone the repo
git clone --depth 1 https://github.com/PostHog/skills

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/posthog/skills/instrument-tracing/github.svg)](https://agentmods.dev/skills/posthog/skills/instrument-tracing)
Your own site
<a href="https://agentmods.dev/skills/posthog/skills/instrument-tracing"><img src="https://agentmods.dev/badge/skills/posthog/skills/instrument-tracing/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 instrument-tracing

Your own site · 80×15
<a href="https://agentmods.dev/skills/posthog/skills/instrument-tracing"><img src="https://agentmods.dev/badge/skills/posthog/skills/instrument-tracing.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 72 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,928 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.00072 $0.02928
Opus 5.5 $0.00029 $0.01171
Sonnet 5.5 $0.00014 $0.00586
Haiku 4.5 $0.00007 $0.00293

Measured 6d ago against content hash 9468b7ca4684, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

instrument-tracing 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 6d 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/omnibus/instrument-tracing/SKILL.md · 119 lines

How it starts

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

Add PostHog distributed tracing

Use this skill to add PostHog distributed tracing for new or changed code. Use it after implementing features or reviewing PRs to ensure request entry points, outbound calls, and background jobs produce spans, when the user asks to add tracing or spans, or to point existing OpenTelemetry tracing at PostHog. Supports any platform or language.

Supported platforms: Node.js, Next.js, Python (including Django, FastAPI, and Flask), Go, Java, .NET, PHP, Ruby, and any language via OpenTelemetry (OTLP).

PostHog tracing uses the standard OpenTelemetry SDK and an OTLP HTTP trace exporter. It does not need a PostHog SDK.

Instructions

Follow these steps IN ORDER:

STEP 1: Analyze the codebase and detect the platform.

  • Detect the language, framework, and existing tracing setup.
  • Look for dependency files and project files (package.json, requirements.txt, pyproject.toml, go.mod, pom.xml, build.gradle, *.csproj, Gemfile, composer.json, etc.).
  • Look for lockfiles (pnpm-lock.yaml, package-lock.json, yarn.lock, bun.lockb, poetry.lock, uv.lock, go.sum, Gemfile.lock, composer.lock, etc.) to determine the package manager.
  • Look for existing tracing: an OpenTelemetry tracer provider, an instrumentation.ts file, an opentelemetry-instrument launch command, an OpenTelemetry Collector config, a Java agent flag, or another vendor's tracing agent.
  • Check whether a PostHog SDK (posthog-js, posthog-node, posthog-python) is already installed. You need this only for STEP 6.

STEP 2: Choose the capture path.

  • If the codebase already exports OpenTelemetry traces, point the existing OTLP trace exporter (or Collector) at PostHog. Reuse the existing tracer provider. If it exports to another tracing backend, ask the user before you add PostHog as a second destination.
  • Otherwise, add the OpenTelemetry SDK with an OTLP HTTP trace exporter and auto-instrumentation. Auto-instrumentation creates spans for HTTP servers, frameworks, and database drivers without code changes.
  • Read the platform reference that matches the detected stack now. Use its "With OpenTelemetry" section. If no reference matches, use the general installation reference.

Read the full file on GitHub · 119 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. 6d ago Changed 9468b7ca4684
  2. 13d ago Changed 0ca5f99fb922
  3. 19d ago Changed · +4 lines ea45fd55c41d
  4. 1mo ago First seen · 115 lines · 72 tokens per session scan A c726b54d0690

Subscribe to this mod's changes

instrument-tracing is a skill published in the GitHub repository PostHog/skills (81 stars, last pushed today), licensed MIT. It adds 72 tokens to every session and 2,928 once invoked, about $0.0003 per session on Opus 5.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-10-29.

Related

instrument-tracing compared with skills from other repositories

instrument-tracing next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
instrument-tracingPostHog/skillsSkill81todayMITA72Claude Code, Codex
systematic-debuggingopen-metadata/OpenMetadataSkill16ktodayApache-2.0A37Claude Code
log-error-digestzebbern/claude-code-guideSkill4.7ktodayMITA71Claude Code, Codex
observability-audit-sessionsIBM/mcp-context-forgeSkill4.9ktodayApache-2.0A64Claude Code, Codex
cwv-optimizeradobe/skillsSkill342todayApache-2.0A112Claude Code
ci-fixersipyourdrink-ltd/bernsteinSkill1.2ktodayApache-2.0A15Claude Code, Codex
diagnosing-missing-recordingsPostHog/posthogSkill41ktodaynoneA76Claude Code, Codex