observability

observability is a skill for Claude Code, Codex from fmind/dot. It costs 40 tokens per session (1,196 once invoked), scanned A, original, MIT.

A setup for recording what a service or software agent is doing through structured logs, request traces, and measurements. It connects related records with a trace ID and supports Google Cloud monitoring tools.

In plain words
What is it for?
Use it to add JSON logs, OpenTelemetry traces and metrics, request correlation, and spans for language-model or agent operations.
Why use it?
It makes it easier to follow a request across services and investigate failures, slow operations, and agent or language-model activity.

Skill for Claude CodeCodex

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/fmind/dot/observability
Any agent
npx skills add fmind/dot --skill observability
Clone the repo
git clone --depth 1 https://github.com/fmind/dot

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 observability

README.md
[![agentmods](https://agentmods.dev/badge/skills/fmind/dot/observability.svg)](https://agentmods.dev/skills/fmind/dot/observability)
Your own site
<a href="https://agentmods.dev/skills/fmind/dot/observability"><img src="https://agentmods.dev/badge/skills/fmind/dot/observability.svg" alt="Measured on agentmods" height="20"></a>
Per session 40 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,196 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 $0.00040 $0.01196
Opus 5 $0.00020 $0.00598
Sonnet 5 $0.00008 $0.00239
Haiku 4.5 $0.00004 $0.00120

Measured yesterday against content hash 0fc44ca9e753, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

observability 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 yesterday.

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/observability/SKILL.md · 49 lines

How it starts

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

Observability

One telemetry stack for services and agents: JSON logs on stdout, OpenTelemetry traces and metrics over OTLP, and the trace id stamped on every log line so Cloud Logging, Cloud Trace, and Cloud Monitoring show one request end to end. The stacks ship the logging defaults (go-stack slog, python-stack structlog); this skill owns the wiring across signals and the conventions for LLM and agent spans.

Workflow

  1. Structured logs: JSON to stdout, one event per line. Go: slog.NewJSONHandler(os.Stdout, &slog.HandlerOptions{ReplaceAttr: gcpKeys}) where gcpKeys renames level to severity and msg to message, the keys Cloud Logging parses. Python: structlog with JSONRenderer and the same keys.
  2. Traces and metrics: use the plain OTLP exporters configured only by the standard env vars (OTEL_EXPORTER_OTLP_ENDPOINT, OTEL_SERVICE_NAME, OTEL_RESOURCE_ATTRIBUTES) so local runs stay silent and no vendor SDK enters the code; wrap HTTP servers and clients with otelhttp (Go) or the opentelemetry-instrumentation-* packages (Python).
  3. Correlate: a slog.Handler or structlog processor reads the active span and adds logging.googleapis.com/trace = projects/<project>/traces/<trace_id> and logging.googleapis.com/spanId; Cloud Logging then links the line to its trace. Keep a plain trace_id field too for other backends.
  4. Export on Google Cloud: run the Google-built OpenTelemetry Collector (otelcol-google) as a Cloud Run sidecar; the app exports to http://localhost:4317, the collector authenticates with ADC and forwards traces, metrics, and logs to telemetry.googleapis.com. ADK agents use --otel_to_cloud per google-adk.
  5. LLM and agent spans: follow the GenAI semantic conventions: span chat <model> with gen_ai.operation.name, gen_ai.provider.name, gen_ai.request.model, gen_ai.usage.input_tokens, gen_ai.usage.output_tokens; invoke_agent <name> with gen_ai.agent.name; execute_tool <name> with gen_ai.tool.name. Never record prompt or completion bodies by default.
  6. Verify: send one request, open its trace in Cloud Trace, then read the correlated lines per gcloud and confirm the metric exists in Cloud Monitoring.
    gcloud logging read 'trace="projects/<project>/traces/<trace_id>"' --limit=20
    

Read the full file on GitHub · 49 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. yesterday First seen · 49 lines · 40 tokens per session scan A 0fc44ca9e753

Subscribe to this mod's changes

observability is a skill published in the GitHub repository fmind/dot (4 stars, last pushed today), licensed MIT. It adds 40 tokens to every session and 1,196 once invoked, about $0.0002 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-03.