python-observability

Implement Python observability with structlog, Prometheus, and OpenTelemetry.

3|Updated Jan 8, 2026
One-click install
npx skills add https://github.com/DrLuggels/my_dhbw --skill python-observability-drluggels
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: python-observability
Source: https://github.com/DrLuggels/my_dhbw/tree/main/.claude/plugins/python-development/skills/python-observability
Command: npx skills add https://github.com/DrLuggels/my_dhbw --skill python-observability-drluggels

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires structlog, prometheus_client, opentelemetry-api, opentelemetry-sdk, opentelemetry-exporter-otlp, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill helps developers instrument their Python applications to gain deep insights into their behavior in production, enabling faster debugging and performance optimization.

Core Features & Use Cases

  • Structured Logging: Implement machine-readable JSON logs for easier querying and alerting.
  • Metrics Collection: Integrate with Prometheus to track key performance indicators (KPIs) like latency, traffic, errors, and saturation.
  • Distributed Tracing: Set up end-to-end request tracing across microservices using correlation IDs and OpenTelemetry.
  • Use Case: When a critical API endpoint starts experiencing high error rates, use this Skill to analyze logs, trace the request flow, and pinpoint the exact service or operation causing the failure.

Quick Start

Configure structlog for JSON output with consistent fields by calling the configure_logging function.

Frequently Asked Questions about python-observability

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

FAQPage Schema
How do I implement Python observability with structured logging and Prometheus metrics?

Python observability is implemented by configuring structlog for machine-readable JSON logs and integrating prometheus_client to track the four golden signals: latency, traffic, errors, and saturation. This provides deep production insights for faster debugging.

How do I configure structlog for JSON output with consistent fields?

Configuring structlog for JSON output with consistent fields is done by calling the `configure_logging` function provided by the Skill. This generates machine-readable logs that enable easier querying and alerting across your production applications.

What is the best way to track the four golden signals in a Python application?

Tracking the four golden signals in a Python application is best achieved by integrating Prometheus to collect key performance indicators. The Skill provides tools to monitor latency, traffic, errors, and saturation to optimize performance and debug systems.

Do I need opentelemetry-sdk and opentelemetry-exporter-otlp for distributed tracing?

Yes, opentelemetry-sdk and opentelemetry-exporter-otlp are required dependencies for distributed tracing. They work with the OpenTelemetry API to propagate correlation IDs and export trace data, enabling end-to-end request visibility across microservices.

When do I need structured logging and distributed tracing for Python debugging?

Structured logging and distributed tracing are needed when debugging production systems experiencing high error rates or performance issues. They allow you to analyze JSON logs, trace request flows, and pinpoint the exact service causing failures.