instrumenting-wide-events

instrumenting-wide-events is a skill for Claude Code, Codex from adammiribyan/wide_events. It costs 54 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 54 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.00054 $0.00901
Opus 5 $0.00027 $0.00451
Sonnet 5 $0.00011 $0.00180
Haiku 4.5 $0.00005 $0.00090

Measured 12d ago against content hash 33f3ccba260f, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, 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 12d 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. 12d 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 1mo ago), licensed MIT. It adds 54 tokens to every session and 901 once invoked, about $0.0003 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

frontmcp-observability

Use when adding tracing, structured logging, metrics, or monitoring to a FrontMCP server. Covers zero-config OpenTelemetry distributed tracing across all flows; the this.telemetry API for custom spans, events, and attributes in tools, plugins, agents, and skills; structured JSON logging with trace correlation and…

agentfront/frontmcp · 177 tokens

observability-stack-setup

Bootstrap end-to-end observability with OpenTelemetry traces, metrics, and logs, including GenAI LLM span conventions, dashboards, alerts, and SLO/SLI definition.

andreibesleaga/GABBE · 42 tokens

phoenix-observability

Open-source AI observability platform for LLM tracing, evaluation, and monitoring. Use when debugging LLM applications with detailed traces, running evaluations on datasets, or monitoring production AI systems with real-time insights.

davila7/claude-code-templates · 47 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

telemetry-inspect

Inspects the OrchestKit telemetry pipeline for the current project — lists all known telemetry files with write counts, sizes, schema status, growth trend, and orphan detection. Use when verifying the observability pipeline is healthy, debugging a missing writer, or auditing which files have schema locks vs. which are…

yonatangross/orchestkit · 78 tokens