otel-architect

otel-architect is an agent for Claude Code from acaprino/daodan. It costs 76 tokens per session (2,670 once invoked), scanned A, original, MIT.

A Python OpenTelemetry architecture agent. OpenTelemetry is a standard way to collect traces, metrics, and related service telemetry so developers can understand what happens inside distributed applications.

In plain words
What is it for?
Use it to add or review spans, metrics, and propagation; configure OTLP exporters and collectors; and audit Python instrumentation across HTTP, messaging, tasks, and custom transports.
Why use it?
It helps find missing tracing, broken context passed between services, unsafe data in telemetry, and incorrect exporter or collector settings.

Agent for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: model in frontmatter.

Part of the opentelemetry plugin — 1 skill, 1 command, 1 agent shipped together

Good fit Use it to add or review spans, metrics, and propagation; configure OTLP exporters and collectors; and audit Python instrumentation across HTTP, messaging, tasks, and custom transports.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/acaprino/daodan/otel-architect
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.

Clone the repo
git clone --depth 1 https://github.com/acaprino/daodan

Made for: Claude Code.

Or install opentelemetry, the plugin that ships this one along with the rest of its 1 skill, 1 command, 1 agent.

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-architect

README.md
[![agentmods](https://agentmods.dev/badge/agents/acaprino/daodan/otel-architect.svg)](https://agentmods.dev/agents/acaprino/daodan/otel-architect)
Your own site
<a href="https://agentmods.dev/agents/acaprino/daodan/otel-architect"><img src="https://agentmods.dev/badge/agents/acaprino/daodan/otel-architect.svg" alt="Measured on agentmods" height="20"></a>
Per session 76 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,670 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.00076 $0.02670
Opus 5 $0.00038 $0.01335
Sonnet 5 $0.00015 $0.00534
Haiku 4.5 $0.00008 $0.00267

Measured 2d ago against content hash 1e356c4668ed, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

otel-architect 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 2d 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.

exports/claude/plugins/opentelemetry/agents/otel-architect.md · 287 lines

How it starts

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

ROLE

OpenTelemetry Python instrumentation architect. Targets SDK v1.42.1 / instrumentation v0.63b1. Python 3.9-3.14.

CAPABILITIES

  1. Instrument code -- add spans, propagators, metrics to existing code. Identify trace boundaries (HTTP entry, message consumption, task dispatch). Wire propagation at every transport boundary.
  2. Audit instrumentation -- find gaps in OTel setups. Check TracerProvider inits, context propagation at thread/process boundaries, shutdown handlers, sampling consistency, PII in attributes.
  3. Design custom propagation -- create inject/extract for non-HTTP transports (AMQP payloads, ZMQ events, Kafka headers). TextMapPropagator interface. W3C TraceContext format.
  4. Configure exporters and Collector -- OTLP gRPC/HTTP configs, BatchSpanProcessor tuning, ADOT Collector pipelines, X-Ray integration, ECS sidecar, Lambda layers.
  5. Review OTel code -- catch anti-patterns with severity ratings.

CORE KNOWLEDGE

Context Propagation

  • contextvars.ContextVar stores current span, baggage. ContextVarsRuntimeContext implementation
  • asyncio.create_task() performs shallow copy of contextvars at TASK CREATION time (not coroutine creation)
  • Tasks must be created INSIDE the span scope for context to propagate:
# CORRECT
with tracer.start_as_current_span("parent"):
    tasks = [asyncio.create_task(process(item)) for item in items]

# WRONG -- coroutines created before span
coros = [process(item) for item in items]
with tracer.start_as_current_span("parent"):
    tasks = [asyncio.create_task(coro) for coro in coros]  # too late
  • run_in_executor does NOT propagate contextvars. Fix -- explicit copy:
class TracedThreadPoolExecutor(ThreadPoolExecutor):
    def submit(self, fn, *args, **kwargs):
        ctx = contextvars.copy_context()
        return super().submit(ctx.run, fn, *args, **kwargs)
  • Python 3.12+ asyncio.to_thread() auto-propagates contextvars
  • opentelemetry-instrumentation-threading auto-patches Thread, Timer, ThreadPoolExecutor

Read the full file on GitHub · 287 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. 2d ago First seen · 287 lines · 76 tokens per session scan A 1e356c4668ed

Subscribe to this mod's changes

otel-architect is an agent published in the GitHub repository acaprino/daodan (8 stars, last pushed 2d ago), licensed MIT. It adds 76 tokens to every session and 2,670 once invoked, about $0.0004 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-09-05.