obsidian-observability
Installation
SKILL.md
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
ItemViewfor the debug panel
Instructions
Step 1: Structured Logger with Levels and History
// src/services/logger.ts
type LogLevel = 'debug' | 'info' | 'warn' | 'error';
const LEVEL_PRIORITY: Record<LogLevel, number> = {
debug: 0, info: 1, warn: 2, error: 3,
};