Context
The current metrics surface total errors (hyperbytedb_errors_total) but provide no breakdown. Operators cannot distinguish between:
- Client errors (4xx: bad queries, auth failures, invalid line protocol)
- Server errors (5xx: internal failures, chDB errors, WAL write failures)
- Specific error types (rate limit exceeded, auth denied, query parse failure, chDB execution error)
Deliverables
-
Replace or supplement hyperbytedb_errors_total with hyperbytedb_http_requests_total{status="2xx|4xx|5xx",method="POST|GET|DELETE",endpoint="/write|/query|..."}.
-
Replace hyperbytedb_query_errors_total and hyperbytedb_write_errors_total with more specific counters:
hyperbytedb_wal_write_errors_total
hyperbytedb_chdb_query_errors_total
hyperbytedb_chdb_write_errors_total
hyperbytedb_auth_errors_total{reason="invalid_password|user_not_found|token_expired"}
-
Add hyperbytedb_query_parse_errors_total to track malformed queries separately from execution errors.
-
Update docs/user-guide/monitoring.md with the new metric names and recommended alert thresholds.
References
- HTTP handler error responses —
src/adapters/http/
- Query and write services —
src/application/
docs/user-guide/monitoring.md — existing metrics docs
Priority
P2 — Observability, operations
Context
The current metrics surface total errors (
hyperbytedb_errors_total) but provide no breakdown. Operators cannot distinguish between:Deliverables
Replace or supplement
hyperbytedb_errors_totalwithhyperbytedb_http_requests_total{status="2xx|4xx|5xx",method="POST|GET|DELETE",endpoint="/write|/query|..."}.Replace
hyperbytedb_query_errors_totalandhyperbytedb_write_errors_totalwith more specific counters:hyperbytedb_wal_write_errors_totalhyperbytedb_chdb_query_errors_totalhyperbytedb_chdb_write_errors_totalhyperbytedb_auth_errors_total{reason="invalid_password|user_not_found|token_expired"}Add
hyperbytedb_query_parse_errors_totalto track malformed queries separately from execution errors.Update
docs/user-guide/monitoring.mdwith the new metric names and recommended alert thresholds.References
src/adapters/http/src/application/docs/user-guide/monitoring.md— existing metrics docsPriority
P2 — Observability, operations