← ClaudeAtlas

observabilitylisted

Structured logging, debugging (pdb/ipdb), profiling (cProfile/line_profiler), and performance monitoring. Use when adding logging, debugging issues, or optimizing performance. TRIGGER when: logging, debug, profiling, performance monitoring, metrics, stack trace. DO NOT TRIGGER when: feature implementation, testing, documentation, config changes.
akaszubski/autonomous-dev · ★ 29 · AI & Automation · score 68
Install: claude install-skill akaszubski/autonomous-dev
# Observability Skill Comprehensive guide to logging, debugging, profiling, and performance monitoring in Python applications. ## When This Skill Activates - Adding logging to code - Debugging production issues - Profiling performance bottlenecks - Monitoring application metrics - Analyzing stack traces - Performance optimization - Keywords: "logging", "debug", "profiling", "performance", "monitoring" --- ## Core Concepts ### 1. Structured Logging Structured logging with JSON format for machine-readable logs and rich context. **Why Structured Logging?** - Machine-parseable (easy to search, filter, aggregate) - Context-rich (attach metadata to log entries) - Consistent format across services **Key Features**: - JSON-formatted logs - Log levels (DEBUG, INFO, WARNING, ERROR, CRITICAL) - Context logging with extra metadata - Best practices for meaningful logs **Example**: ```python import logging import json logger = logging.getLogger(__name__) logger.info("User action", extra={ "user_id": 123, "action": "login", "ip": "192.168.1.1" }) ``` **See**: `docs/structured-logging.md` for Python logging setup and patterns --- ### 2. Debugging Techniques Interactive debugging with pdb/ipdb and effective debugging strategies. **Tools**: - **Print debugging** - Quick and simple - **pdb** - Python's built-in debugger - **ipdb** - IPython-enhanced debugger - **Post-mortem debugging** - Debug after crash **pdb Commands**: - `n` (next) - Execute current line - `s` (