otel-python

otel-python is a skill for Claude Code from ollygarden/opentelemetry-agent-skills. It costs 120 tokens per session (916 once invoked), scanned A, original, Apache-2.0.

A reference guide for adding OpenTelemetry observability to Python services. OpenTelemetry is a standard way to collect traces, metrics, and logs so you can understand how an application behaves.

In plain words
What is it for?
Use it to configure or troubleshoot OpenTelemetry in Python, add automatic or manual instrumentation, tune collection, and check changes between SDK versions.
Why use it?
It helps developers choose between automatic setup, configuration files, and manual instrumentation, while avoiding outdated APIs and configuration mistakes. It also covers performance settings and clean shutdowns.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the opentelemetry-agent-skills plugin — 19 skills shipped together

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/ollygarden/opentelemetry-agent-skills/otel-python
Any agent
npx skills add ollygarden/opentelemetry-agent-skills --skill otel-python
Clone the repo
git clone --depth 1 https://github.com/ollygarden/opentelemetry-agent-skills

Made for: Claude Code.

Or install opentelemetry-agent-skills, the plugin that ships this one along with the rest of its 19 skills.

Its marketplace also offers this one on its own, as the plugin otel-python/plugin install otel-python after adding the marketplace above.

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 otel-python

README.md
[![agentmods](https://agentmods.dev/badge/skills/ollygarden/opentelemetry-agent-skills/otel-python.svg)](https://agentmods.dev/skills/ollygarden/opentelemetry-agent-skills/otel-python)
Your own site
<a href="https://agentmods.dev/skills/ollygarden/opentelemetry-agent-skills/otel-python"><img src="https://agentmods.dev/badge/skills/ollygarden/opentelemetry-agent-skills/otel-python.svg" alt="Measured on agentmods" height="20"></a>
Per session 120 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 916 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.1 $0.00120 $0.00916
Opus 5 $0.00060 $0.00458
Sonnet 5 $0.00024 $0.00183
Haiku 4.5 $0.00012 $0.00092

Measured 6d ago against content hash e09c2d8754d5, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

otel-python 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/otel-python/SKILL.md · 44 lines

How it starts

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

OpenTelemetry in Python

Entry point for OpenTelemetry mechanics in Python services. Load a reference below based on the task; each reference is self-contained.

References

File Use when
references/declarative-setup.md Configuring the SDK via declarative YAML (opentelemetry-configuration / opentelemetry.configuration): load_config_file, configure_sdk, file_format, env substitution, OTEL_CONFIG_FILE and programmatic activation.
references/api.md Import paths, global API access, tracer/meter/logger usage, attributes, propagation, the Python logging bridge (LoggingHandler).
references/instrumentation-libraries.md Zero-code (opentelemetry-distro, opentelemetry-bootstrap, opentelemetry-instrument), the contrib catalog, and manual instrumentation following semconv.
references/performance.md Tuning sampling, batch span processor, periodic metric reader, views, asyncio context, exporters, graceful shutdown.
references/breaking-changes.md Auditing existing code for deprecated/renamed APIs and semconv changes across recent SDK/contrib releases.

Sources of Truth

For YAML schema details, fetch the upstream sources listed in the otel-declarative-config skill. For Python-specific facts:

Fact Fetch
Latest opentelemetry-sdk / opentelemetry-api WebFetch https://pypi.org/pypi/opentelemetry-sdk/json (.info.version)
Latest opentelemetry-configuration WebFetch https://pypi.org/pypi/opentelemetry-configuration/json
Latest opentelemetry-distro WebFetch https://pypi.org/pypi/opentelemetry-distro/json
Latest opentelemetry-instrumentation-<pkg> (contrib) WebFetch https://pypi.org/pypi/opentelemetry-instrumentation-<pkg>/json
Latest OTLP exporter WebFetch https://pypi.org/pypi/opentelemetry-exporter-otlp/json
Declarative config support (released 1.44.0 overview) WebFetch https://raw.githubusercontent.com/open-telemetry/opentelemetry-python/v1.44.0/opentelemetry-configuration/README.rst
Declarative config vendored schema (released 1.44.0) WebFetch https://raw.githubusercontent.com/open-telemetry/opentelemetry-python/v1.44.0/opentelemetry-configuration/src/opentelemetry/configuration/schema.json
SDK CHANGELOG through 1.44.0 WebFetch https://raw.githubusercontent.com/open-telemetry/opentelemetry-python/v1.44.0/CHANGELOG.md
Contrib CHANGELOG through 0.65b0 WebFetch https://raw.githubusercontent.com/open-telemetry/opentelemetry-python-contrib/v0.65b0/CHANGELOG.md
Python getting-started docs WebFetch https://opentelemetry.io/docs/languages/python/getting-started/

Read the full file on GitHub · 44 lines

Files

What ships with it

5 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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 First seen · 44 lines · 120 tokens per session scan A e09c2d8754d5

Subscribe to this mod's changes

otel-python is a skill published in the GitHub repository ollygarden/opentelemetry-agent-skills (97 stars, last pushed 2d ago), licensed Apache-2.0. It adds 120 tokens to every session and 916 once invoked, about $0.0006 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-30.

Related

Other skills, from other repositories

otel-python-style

Python OpenTelemetry style: module-scope tracers/meters, decorators for bounded work, error spans, logs, and no wrappers.

superloglabs/skills · 31 tokens

dd-code-generation

Use pup CLI for immediate Datadog operations or generate code for integration into applications.

DataDog/pup · 16 tokens

python-code-reviewer

Review Python OpenInference instrumentation code for correctness and completeness. Use this skill when reviewing a Python instrumentor package — whether it's a new instrumentor, a PR that modifies one, or when the user asks to audit/review/check an existing instrumentor's code quality. Trigger on phrases like "review…

Arize-ai/openinference · 100 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

clawmetry-selfcheck

Read your own agent telemetry from ClawMetry (waste, progress, cost) and act on it before finishing a task. Use when ClawMetry is installed on this machine and you want to check whether you are re-reading files, spinning in loops, or burning budget.

vivekchand/clawmetry · 64 tokens

clawmetry

Real-time observability for OpenClaw agents — local dashboard + optional encrypted cloud sync. Tracks costs, tokens, sessions, tool calls, memory, crons, and system health. Access from anywhere via ClawMetry Cloud.

vivekchand/clawmetry · 51 tokens