python-observability

Community

Python observability: logs, metrics, traces.

AuthorNorkzYT
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This Skill helps Python developers achieve end-to-end observability by providing structured logging, metrics, and distributed tracing, enabling faster diagnosis of production issues without invasive changes.

Core Features & Use Cases

  • Structured Logging: emit JSON logs with consistent fields for correlation and filtering.
  • Metrics & Tracing: collect Prometheus-compatible metrics and OpenTelemetry traces to monitor performance and service interactions.
  • Use Case: when debugging a running service, instrument code to capture request latency, errors, and throughput, and correlate across services.

Quick Start

Install and configure the recommended libraries (e.g., structlog, prometheus_client, and opentelemetry) and provide a minimal example to initialize logging, metrics, and tracing. Example (plain text): import logging import structlog from prometheus_client import start_http_server from opentelemetry import trace from opentelemetry.sdk.trace import TracerProvider from opentelemetry.exporter.otlp.proto.grpc.exporter import OTLPSpanExporter from opentelemetry.sdk.trace.export import BatchSpanProcessor

Initialize logging

structlog.configure(...) logging.basicConfig(level="INFO") logger = structlog.get_logger()

Start metrics server

start_http_server(8000)

Configure tracing

provider = TracerProvider() processor = BatchSpanProcessor(OTLPSpanExporter(endpoint="http://localhost:4317")) provider.add_span_processor(processor) trace.set_tracer_provider(provider) tracer = trace.get_tracer(name) logger.info("Observability initialized")

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: python-observability
Download link: https://github.com/NorkzYT/claude-code-autopilot/archive/main.zip#python-observability

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.