No description
Find a file
Chris Arseno bc8650c33b
Some checks are pending
CI / lint (push) Waiting to run
CI / test (3.11) (push) Waiting to run
CI / test (3.12) (push) Waiting to run
CI / test (3.13) (push) Waiting to run
chore: community edition of gozerai-telemetry
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>
2026-07-03 02:56:01 -04:00
.github/workflows chore: community edition of gozerai-telemetry 2026-07-03 02:56:01 -04:00
src/gozerai_telemetry chore: community edition of gozerai-telemetry 2026-07-03 02:56:01 -04:00
tests chore: community edition of gozerai-telemetry 2026-07-03 02:56:01 -04:00
.gitignore chore: community edition of gozerai-telemetry 2026-07-03 02:56:01 -04:00
LICENSE chore: community edition of gozerai-telemetry 2026-07-03 02:56:01 -04:00
pyproject.toml chore: community edition of gozerai-telemetry 2026-07-03 02:56:01 -04:00
README.md chore: community edition of gozerai-telemetry 2026-07-03 02:56:01 -04:00

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

  • MetricsCounter, Gauge, Histogram with a Prometheus text-exposition collector
  • Tracing — lightweight spans with attributes and correlation propagation
  • Health — a HealthReporter with 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.