Repository navigation
v0.4.3
Summary
Fix a critical sort bug in latency percentile calculation and add a zero-dependency Prometheus metrics handler.
Bug Fixes
- Fix
GetLatencyPercentile: latency slice was not sorted before percentile calculation, returning incorrect values - Fix
GetMetricsSnapshot: nestedRLockon non-reentrantsync.RWMutexcaused potential deadlock; inlined computation within single lock scope
What's New
MetricsHandler(pool)returns anhttp.Handlerserving Prometheus text exposition format- Metrics exposed:
pyproc_requests_total,pyproc_request_duration_seconds,pyproc_workers_total,pyproc_workers_healthy,pyproc_inflight_requests,pyproc_worker_restarts_total - Monitoring guide with Prometheus scrape config, Grafana dashboard JSON, and alerting rules
Files
pkg/pyproc/pool_metrics.go(bug fix + refactor)pkg/pyproc/metrics_handler.go(new)pkg/pyproc/metrics_handler_test.go(new)docs/deployment/monitoring.md(rewritten)
Full Changelog: v0.4.2...v0.4.3