instrumenting-wide-events

instrumenting-wide-events is a skill for Claude Code, Codex from adammiribyan/wide_events. It costs 0 tokens per session (901 once invoked), scanned A, original, MIT.

A development guide for adding production telemetry: recorded information about requests and background jobs. It explains how to attach domain data, measure phases, and record handled errors.

In plain words
What is it for?
Use it when adding features, background jobs, slow operations, or rescue blocks that should appear in production monitoring.
Why use it?
It makes new or changed code observable so slow paths and failures can be investigated later.

Skill for Claude CodeCodex

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

Good fit Use it when adding features, background jobs, slow operations, or rescue blocks that should appear in production monitoring.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/adammiribyan/wide_events/instrumenting-wide-events
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 adammiribyan/wide_events --skill instrumenting-wide-events
Clone the repo
git clone --depth 1 https://github.com/adammiribyan/wide_events

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 instrumenting-wide-events

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/adammiribyan/wide_events/instrumenting-wide-events"><img src="https://agentmods.dev/badge/skills/adammiribyan/wide_events/instrumenting-wide-events.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 901 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.00000 $0.00901
Opus 5.5 $0.00000 $0.00360
Sonnet 5.5 $0.00000 $0.00180
Haiku 4.5 $0.00000 $0.00090

Measured 3mo ago against content hash 33f3ccba260f, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

instrumenting-wide-events 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 3mo 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/instrumenting-wide-events/SKILL.md · 95 lines

How it starts

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

Instrumenting wide events

Every HTTP request and job execution in this app emits one flat telemetry event: the OTel root span, marked main = true (or one JSON log line with the :log sink). The gem records the generic attributes (route, status, timings, query counts, cache hits). Your job is the attributes only the app knows: the domain nouns.

The API

Attribute writes are safe no-ops outside a request/job; phase still executes and returns its block. Telemetry failures never raise into app code.

# Flat attributes, merged into the current event
WideEvent.set("report.id" => report.id, "report.format" => "pdf")

# Time a block into <name>.duration_ms (returns the block's value)
WideEvent.phase("pdf_render") { render_pdf }

# Mark a handled failure in a rescue block
rescue Api::ClientError => e
  WideEvent.error!(slug: "err-vendor-user-not-found", exception: e, expected: true)

error! slugs are static kebab-case string literals, unique across the app, prefixed err-. Never interpolate into a slug. Unhandled exceptions get error: true with NO slug automatically: that absence is the standing "instrument this rescue" query, so don't fake slugs for paths you didn't handle.

Naming conventions

  • Flat keys, dot namespaces, snake_case leaves: report.page_count, not reportPageCount or nested hashes.
  • Durations end in _duration_ms (float milliseconds). Counts end in _count.
  • Booleans read as assertions: report.cached, not report.cache_status.
  • Timestamps are RFC 3339 strings (pass a Time; the gem serializes it).
  • Sizes and counts over raw content: note.body_char_count: 2140, never the note text.

PII policy

Apply the deployment's privacy policy to every identifier. Opaque user and account IDs are preferable to names or emails, but still declare them as pii: opaque_id. Exclude free-text user input and request params. If an attribute could quote user input, mark it pii: review in the registry and expect it to be scrubbed or excluded from forwarding.

Read the full file on GitHub · 95 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. 3mo ago First seen · 95 lines · 0 tokens per session scan A 33f3ccba260f

Subscribe to this mod's changes

instrumenting-wide-events is a skill published in the GitHub repository adammiribyan/wide_events (11 stars, last pushed 26d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 901 tokens. 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

instrumenting-wide-events compared with skills from other repositories

instrumenting-wide-events next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
instrumenting-wide-eventsadammiribyan/wide_eventsSkill1126d agoMITA0Claude Code, Codex
frontmcp-observabilityagentfront/frontmcpSkill154todayApache-2.0A198Claude Code, Codex
otel-rubyollygarden/opentelemetry-agent-skillsSkill126yesterdayApache-2.0A127Claude Code
ruby-expertpersonamanagmentlayer/pclSkill461mo agoApache-2.0A64Claude Code
Telemetry Conventionsniels-emmer/myaceSkill1yesterdayMITA32Claude Code, Codex
observability-stack-setupandreibesleaga/GABBESkill243d agononeA64Claude Code, Codex
observability-phoenixdavila7/claude-code-templatesSkill34ktodayMITA47Claude Code, Codex