Lightweight, zero-dependency observability for Python services — part of the GozerAI ecosystem.
A single small package that emits Prometheus-compatible metrics, distributed traces, health status, structured logs, and SLO tracking — with no third-party dependencies. Drop it into any service to get consistent telemetry across a fleet.
- Metrics —
Counter,Gauge,Histogramwith a Prometheus text-exposition collector - Tracing — lightweight spans with attributes and correlation propagation
- Health — a
HealthReporterwith pluggable checks and timeouts - Structured logging — JSON log formatting with correlation IDs
- Correlation — request-scoped correlation context + header injection/extraction
- Resilience patterns — rate limiting, retries, and circuit-breaker helpers
- SLO — service-level-objective definitions and burn-rate tracking
pip install -e .No runtime dependencies (Python >= 3.10).
from gozerai_telemetry import get_collector, Tracer, HealthReporter, setup_logging, get_logger
# Metrics
collector = get_collector("my-service")
requests = collector.counter("http_requests_total", "Total HTTP requests")
requests.inc(method="GET", status="200")
# Tracing
tracer = Tracer("my-service")
with tracer.span("handle_request") as s:
s.set_attribute("route", "/health")
# Health
health = HealthReporter("my-service", port=9100)
health.register_check("database", lambda: db.ping())
# Structured logging
setup_logging("my-service", level="INFO")
logger = get_logger("my-service.api")pip install -e ".[dev]"
pytest tests/ -vMIT — see LICENSE. Part of the GozerAI ecosystem; see gozerai.com/pricing for the commercial product tiers that build on it.