obsidian-observability

Featured

Implement structured logging, metrics, error tracking, and a debug panel for Obsidian plugins. Use when adding debug logging, tracking plugin performance, building a diagnostics view, or setting up error reporting. Trigger with phrases like "obsidian logging", "obsidian monitoring", "obsidian debug panel", "track obsidian plugin performance".

AI & Automation 2,944 stars 440 forks Updated today MIT

Install

View on GitHub

Quality Score: 99/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# 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 ```typescript // src/services/logger.ts type LogLevel = 'debug' | 'info' | 'warn' | 'error'; const LEVEL_PRIORITY: Record<LogLevel, number> = { debug: 0, info: 1, warn: 2, error: 3, }; interface LogEntry { timestamp: number; level: LogLevel; message: string; data?: unknown; } export class Logger { private history: LogEntry[] = []; private maxHistory = 200; private level: LogLevel; private prefix: string; constructor(pluginId: string, level: LogLevel = 'info') { this.prefix = `[${pluginId}]`; this.level = level; } setLevel(level: LogLevel) { this.level = level; } debug(msg: string, data?: unknown) { this.log('debug', msg, data); } info(msg: string, data?: unknown) { this.log('info', msg, data); } warn(msg: string, data?: unknown) { this.log('warn', msg, data); } error(msg: string, data?: unknown) { this.log('error', msg, data); } ...

Details

Author
jeremylongshore
Repository
jeremylongshore/claude-code-plugins-plus-skills
Created
1 years ago
Last Updated
today
Language
Python
License
MIT

Integrates with

Bundled in these plugins

Similar Skills

Semantically similar based on skill content — not just same category