observability

Implements structured JSONL logging, correlation IDs, and performance metrics for Bun applications.

6|1|Updated Nov 26, 2025
One-click install
npx skills add https://github.com/nathanvale/side-quest-marketplace-old --skill observability-nathanvale
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: observability
Source: https://github.com/nathanvale/side-quest-marketplace-old/tree/main/plugins/dev-toolkit/skills/observability
Command: npx skills add https://github.com/nathanvale/side-quest-marketplace-old --skill observability-nathanvale

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @side-quest/core/logging.

What problem does it solve? Debugging production issues in Bun applications is difficult without structured logs, traceable operations, and measurable performance data. This Skill provides production-grade patterns for structured logging, correlation ID tracing, and metrics collection using @side-quest/core/logging and LogTape. ## Core Features & Use Cases - Structured JSONL Logging: Set up plugin loggers with hierarchical subsystem categories, log levels, and automatic file rotation for machine-parseable output. - Correlation ID Tracing: Implement OpenTelemetry-compatible three-tier ID hierarchies (sessionCid, cid, parentCid) to trace operations end-to-end across subsystems. - Performance Metrics & Debugging: Aggregate durationMs metrics automatically and debug production issues with grep and jq query patterns against JSONL logs. - Use Case: When a file processing pipeline fails in production, grep the session correlation ID to reconstruct the full operation trace, identify the failing subsystem, and measure operation durations. ## Quick Start Ask the AI to set up structured logging with correlation IDs and subsystem loggers for your Bun plugin using the observability patterns.

Frequently Asked Questions about observability

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I set up structured logging in a Bun application?▼

Use createPluginLogger from @side-quest/core/logging with a plugin name and subsystem list, then call initLogger before any logging. It configures LogTape with JSONL output, file rotation, and hierarchical categories automatically.

How do I trace operations across subsystems with correlation IDs?▼

Create a sessionCid at the top-level operation, generate a unique cid per operation, and pass parentCid to child operations. Include all three IDs in structured log properties so you can grep the full trace later.

What log level should I use for different events?▼

Use DEBUG for detailed diagnostics like retries and loops, INFO for milestones and summaries, WARN for degraded operation or fallbacks, and ERROR for failures and exceptions. This keeps log volume manageable while preserving diagnostic value.

How do I analyze JSONL logs with jq?▼

Filter logs with jq select expressions on properties, such as jq 'select(.properties.durationMs > 1000)' for slow operations. Combine grep for correlation IDs with jq for timeline views and error grouping.

Why are no logs appearing in my log file?▼

Logs will not appear until initLogger is called, so verify it runs at startup. Also check that lowestLevel is not filtering out your messages, confirm the log directory is writable, and inspect the file directly with tail.

Should I assert on log output in tests?▼

No, tests should assert functional behavior rather than log output because LogTape logging is asynchronous and log assertions are fragile. Only test logging infrastructure itself, such as MetricsCollector aggregation logic.