No description
- Python 100%
Zero-dependency observability library (metrics, tracing, health, structured logging, resilience, SLO). MIT licensed. Internal product references genericized; no secrets or private coupling. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> |
||
|---|---|---|
| .github/workflows | ||
| src/gozerai_telemetry | ||
| tests | ||
| .gitignore | ||
| LICENSE | ||
| pyproject.toml | ||
| README.md | ||
Gozerai Telemetry
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.
Features
- 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
Installation
pip install -e .
No runtime dependencies (Python >= 3.10).
Usage
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")
Running Tests
pip install -e ".[dev]"
pytest tests/ -v
License
MIT — see LICENSE. Part of the GozerAI ecosystem; see gozerai.com/pricing for the commercial product tiers that build on it.