Agent skill · software engineering · jeremylongshore

obsidian-observability

Implement structured logging, metrics, error tracking, and a debug panel

Why this skill is useful

Adds a structured logging system, metrics collector, and error tracking scripts specifically for Obsidian plugins that aren't available in public documentation.

What it needs

Requires npm installed locally. About 7k tokens when loaded. Last updated 2026-08-07. 2,604 stars on the source repository.

What this skill does

Obsidian Observability Overview Implement production observability for Obsidian plugins: a structured logger with levels and ring buffer history, a metrics collector with counters/gauges/timers, an error tracker with deduplication, and a debug sidebar panel that displays all of it in real time. Every component is copy-pasteable and uses only Obsidian's built-in APIs. Prerequisites Working Obsidian plugin (see obsidian-core-workflow-a) TypeScript strict mode enabled Familiarity with ItemView for the debug panel Instructions Step 1: Structured Logger with Levels and History Step 2: Metrics Collector with Counters, Gauges, and Timers Step 3: Error Tracker with Deduplication Step 4: Debug Sidebar Panel Step 5: Wire Everything into the Plugin Step 6: CSS for the Debug Panel Output Structured logger with debug/info/warn/error levels and ring buffer history (200 entries) Metrics collector: counters (monotonic), gauges (point-in-time), timers (with p95) Error tracker with deduplication by name+message, occurrence count, and timestamps Debug sidebar panel that auto-refreshes every 3 seconds showing metrics, errors, and logs Export button that copies a full debug bundle to clipboard as JSON Memory and vault stats tracked as gauges every 10 seconds Error Handling Issue Cause Solution ------- ------- ---------- Too much logging output Debug level in production Set level to 'error' or 'warn' for release builds Memory growth from log history Unbounded buffer Ring buffer capped at 200 entries (adjustable) Performance impact from metrics Synchronous metric recording All operations are O(1) map lookups Debug panel slows Obsidian Rapid DOM updates Panel renders at most once per 3 seconds performance.memory undefined Not available on all platforms Guard with if (performance.memory) Error tracker misses errors Error not thrown, just logged Use wrapAsync around all async operations Examples Quick Timing Check Metrics-Wrapped Command Resources Chrome DevTools Performance Obsidian Develop …

How to use it

Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:

@skills jeremylongshore/obsidian-observability--fc4755

View the source on GitHub

Browse the @skills marketplace