py-observability

Instruments Python backends with structured logging, Prometheus metrics, Sentry tracking, and tracing via reusable patterns for FastAPI and async services.

Updated Dec 22, 2025
One-click install
npx skills add https://github.com/CJHarmath/claude-agents-skills --skill py-observability
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: py-observability
Source: https://github.com/CJHarmath/claude-agents-skills/tree/main/skills/py-observability
Command: npx skills add https://github.com/CJHarmath/claude-agents-skills --skill py-observability

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides a cohesive pattern library to instrument Python backends with structured logging, metrics, and tracing for improved debugging and reliability.

Core Features & Use Cases

  • Structured logging setup with a consistent format and contextual data for fast incident analysis.
  • Request-scoped and flow-level tracing to correlate logs across multi-step operations.
  • Prometheus metrics, Sentry error tracking, and health checks to monitor performance and reliability.

Quick Start

Install dependencies and start applying patterns to an existing FastAPI or async Python service to enhance observability.

Frequently Asked Questions about py-observability

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

FAQPage Schema
How do I add structured logging and tracing to a FastAPI backend?

Structured logging for FastAPI uses structlog to provide consistent formatting and request-scoped context, enabling fast incident analysis by correlating logs across multi-step async operations.

What is the best way to set up Prometheus metrics and Sentry error tracking in Python async services?

Setting up Prometheus metrics and Sentry error tracking in Python async services requires a cohesive observability pattern library that monitors performance, tracks errors, and includes health checks for reliability.

Can I use this observability pattern library with SQLAlchemy or SQLModel database access layers?

Yes, the observability patterns apply to database access layers using SQLModel or SQLAlchemy, providing flow-level tracing and contextual data to debug database operations within async Python services.

Does end-to-end tracing for multi-service architectures require request context logging?

End-to-end visibility in multi-service architectures requires request context logging and flow-level tracing to correlate logs across distributed services and improve debugging reliability.

How do I redact sensitive data when implementing structured logging in Python backends?

Data redaction in structured logging is handled by the observability pattern library, ensuring sensitive information is scrubbed from logs while maintaining contextual data for fast incident analysis.