Index of every page on this site: llms.txt
All skills
khoahyh avatar

/observability-logging

@fb2abb3
Run it yourself

Design, add, or review production logs, traces, and metrics for operational questions, safe fields, and error ownership.

Use this Skill: https://skilld.dev/gh/khoahyh/skills/observability-logging

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

SKILL.md

≈36 tokens for metadata: the name and description. ≈981 when used: this file.

Description uses 1.8% of example budget

Before choosing a Skill, your Agent reads its name and description. All available Skills share that space.

  • A shorter description leaves more room for other Skills. This entry exceeds our 1% size suggestion.

In our Claude Code example, all Skill names and descriptions share 8,000 characters. This Skill uses ≈144 characters, or 1.8%.

The 1% threshold is a size suggestion. Longer descriptions can still fit.

Your model, settings, and other Skills decide how much text your Agent can read.

Example settings and source

The example uses a 200k-token context and default Claude Code settings. The count includes the name, description, separators, and when_to_use when present. Codex also counts local file paths.

Skit's source and limits: Codex 0.160.1, Claude Code 2.1.292.

Observability Logging

Use the least production telemetry that answers a defined operational question. If existing signals answer it, add nothing. Use motel-debug for temporary diagnostic probes rather than retaining them as production instrumentation.

Signal And Scope

Operational need Signal
Duration and causal operation boundary Span
Meaningful occurrence or state transition Named event or structured log
Aggregate rate, count, or distribution Metric

A context-rich completion event can answer several known queries; it does not replace useful spans or point-in-time events by default.

Use static names such as checkout.completed or HTTP route templates. Put dynamic values in attributes, with bounded metric dimensions. Resource attributes describe the service and deployment, not individual requests. Use SDK trace/span correlation; an application request ID complements it.

Inbound middleware owns request lifecycle fields; application modules own business outcomes; outbound adapters classify dependency failures. Configure resources, exporters, sampling, and structured logging at the composition root. For Effect programs, use the installed version's span and scoped logging APIs rather than ad hoc global loggers.

Safe Fields

Allowlist fields by operational need. Prefer operation, route template, state or typed error tag, dependency, retry count, and bounded numeric summaries. Opaque non-PII domain IDs belong only where an established allowlist permits them and incident lookup requires them.

Keep secrets, credentials, tokens, cookies, sessions, raw PII, payment data, bodies, SQL parameters, prompts/completions, arbitrary objects, and raw signed URLs out of telemetry. Capture headers or sanitized URL components only through an explicit allowlist. Bound and sanitize untrusted strings; preserve Redacted values through adapters without recording them.

Error Ownership

Record a terminal failure once at the outermost owning boundary that classifies the final operational outcome, correlated with the active span. Include a stable typed error tag and safe context. Lower adapters translate failures rather than duplicating the terminal record at every catch and rethrow.

Handled retries and fallbacks do not make a successful enclosing operation fail. Intentional cancellation is an outcome, not an error. Use WARN for conditions needing operational attention and fatal severity only for process-ending failures.

Completion

For a design or review, identify the operational question, needed signal or existing coverage, ownership, safe fields, and any evidence gaps. For implementation, continue through focused checks of emitted telemetry and fix attributable issues within scope.

The relevant boundary should demonstrate stable names, trace correlation, one terminal error record, accurate handled outcomes, safe fields, and bounded metric dimensions. Use an existing test collector or runtime query that can answer the original question; avoid building a telemetry test framework for a small edit. Report unavailable runtime evidence instead of claiming emission was verified. Repeat or broaden checks only when changes, failures, or unresolved risks warrant it.

Conditional References

Consult version-matched SDK documentation when API behavior is uncertain, and the relevant standard when deciding schema, error, or data-handling policy:

Source: SKILL.md on GitHub

No rule matched.

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No alerts2mo3 checks · Risk SAFE
  • Gen Agent Trust Hub2mo

    The skill provides a set of best-practice guidelines for implementing production logging and observability. It specifically emphasizes security by instructing against the collection of sensitive data such as PII and credentials, and it relies on established industry standards from OpenTelemetry and OWASP.

  • Socket2mo

    No alerts

  • Snyk2mo

    Risk: LOW · No issues

Signed by skilld at fb2abb3. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 4 days ago.

Activeupdated 3 months ago

README badge

README badge for khoahyh/skills/observability-logging