python-observability

Instrument Python applications with structlog, Prometheus, and OpenTelemetry.

Updated Mar 5, 2026
One-click install
npx skills add https://github.com/Himanshu040604/codex-skills-setup --skill python-observability-himanshu040604
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: python-observability
Source: https://github.com/Himanshu040604/codex-skills-setup/tree/main/assets/codex/skills/claude-import/skills/plugins/python-development%40claude-code-workflows/skills/python-observability
Command: npx skills add https://github.com/Himanshu040604/codex-skills-setup --skill python-observability-himanshu040604

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps you instrument Python applications to gain deep insights into their behavior through structured logging, metrics, and distributed tracing, enabling effective debugging and performance monitoring in production.

Core Features & Use Cases

  • Structured Logging: Implement machine-readable JSON logs with consistent fields for easier querying and alerting.
  • Four Golden Signals: Track latency, traffic, errors, and saturation for service health.
  • Correlation IDs: Propagate unique IDs across logs and traces for end-to-end request visibility.
  • Distributed Tracing: Integrate with OpenTelemetry for tracing requests across microservices.
  • Use Case: Debug a critical production issue by tracing a user request through multiple services, examining logs at each hop to pinpoint the source of the error.

Quick Start

Configure structlog for JSON output with consistent fields by running the provided Python code snippet.

Frequently Asked Questions about python-observability

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

FAQPage Schema
How do I instrument Python applications for observability using structured logging and metrics?

To instrument Python applications for observability, you implement structured logging with structlog, collect metrics using Prometheus, and configure distributed tracing with OpenTelemetry to monitor real-time service behavior.

What is the best way to trace a user request across microservices in Python?

The best way to trace a Python microservices request is using OpenTelemetry for distributed tracing and propagating correlation IDs across logs to gain end-to-end visibility for debugging.

How do I track the Four Golden Signals for a Python service?

You track the Four Golden Signals for a Python service by configuring Prometheus metrics collection to monitor latency, traffic, errors, and saturation, ensuring comprehensive production health analysis.

Can I use OpenTelemetry and Prometheus together for Python application monitoring?

Yes, you can use OpenTelemetry and Prometheus together for Python application monitoring. OpenTelemetry handles distributed tracing while Prometheus collects metrics, providing comprehensive observability coverage.

Why do I need correlation IDs in Python structured logs?

You need correlation IDs in Python structured logs to propagate unique identifiers across services, linking related log entries and traces together for end-to-end request visibility during debugging.

Does instrumenting Python apps with structlog support machine-readable JSON output?

Yes, instrumenting Python apps with structlog supports machine-readable JSON output by configuring consistent fields, which enables easier querying, alerting, and parsing of structured log data.