Problem
The current logging system is basic (structured stderr output). Production deployments need metrics, traces, and detailed health checks.
Proposal
Prometheus metrics endpoint
Exports:
kilnx_http_requests_total{method, path, status}
kilnx_http_request_duration_seconds{method, path}
kilnx_db_queries_total{type} (select, insert, update, delete)
kilnx_db_query_duration_seconds
kilnx_sessions_active
kilnx_jobs_total{status} (pending, completed, failed)
Enhanced health check
GET /healthz
{
"status": "ok",
"uptime": "2h34m",
"database": "ok",
"sessions": 42,
"version": "1.5.0"
}
OpenTelemetry traces (optional)
config
telemetry: env OTEL_ENDPOINT
- HTTP request spans
- SQL query spans
- Email/job spans
Config
log
level: info
queries: slow > 100ms
requests: all
metrics: /metrics
telemetry: env OTEL_EXPORTER_OTLP_ENDPOINT
Why
Production visibility. Developers need to know what their app is doing without adding external APM tools.
Problem
The current logging system is basic (structured stderr output). Production deployments need metrics, traces, and detailed health checks.
Proposal
Prometheus metrics endpoint
Exports:
kilnx_http_requests_total{method, path, status}kilnx_http_request_duration_seconds{method, path}kilnx_db_queries_total{type}(select, insert, update, delete)kilnx_db_query_duration_secondskilnx_sessions_activekilnx_jobs_total{status}(pending, completed, failed)Enhanced health check
OpenTelemetry traces (optional)
Config
Why
Production visibility. Developers need to know what their app is doing without adding external APM tools.