-
Notifications
You must be signed in to change notification settings - Fork 1
Prometheus metrics and structured logging #17
Copy link
Copy link
Closed
Labels
area/observabilityMetrics, logging, debug endpointsMetrics, logging, debug endpointsphase/3-visibilityPhase 3: ObservabilityPhase 3: Observabilityplatform/portableCross-platform codeCross-platform codepriority/parallelCan be worked in parallelCan be worked in parallelsize/M~2-3 days of work~2-3 days of work
Milestone
Description
Summary
Prometheus-compatible metrics exposition and structured JSON logging for key system events.
Prometheus Metrics (SDD 12.3)
Exposed at /metrics when EnableMetrics: true.
| Metric | Type | Labels |
|---|---|---|
celeris_requests_total |
Counter | method, path, status |
celeris_request_duration_seconds |
Histogram | method, path |
celeris_connections_active |
Gauge | engine |
celeris_connections_total |
Counter | engine |
celeris_engine_switches_total |
Counter | from, to |
celeris_overload_stage |
Gauge | — |
celeris_overload_escalations_total |
Counter | from_stage, to_stage |
celeris_syscalls_total |
Counter | type |
celeris_buffer_utilization |
Gauge | worker |
celeris_iouring_sq_utilization |
Gauge | worker |
celeris_iouring_tier |
Gauge | — |
Structured Logging (SDD 12.2)
JSON format for key events:
- Engine switch:
{"event":"engine_switch","from":"iouring","to":"epoll","reason":"h2c_bias","timestamp":"..."} - Overload escalation:
{"event":"overload_escalation","from_stage":1,"to_stage":2,"cpu_pct":82.5,"timestamp":"..."} - Overload de-escalation: similar format
- Tier detection:
{"event":"tier_detected","tier":"High","kernel":"5.19.0","features":["multishot_accept","pbuf"]}
Tests
- All metrics registered with correct types and labels
-
/metricsendpoint returns valid Prometheus format -
/metricsreturns 404 whenEnableMetrics: false - Log output is valid JSON
- Engine switch event logged with correct fields
- Overload escalation/de-escalation logged
- Integration: generate traffic → scrape
/metrics→ verify counter increments
SDD Reference
Sections 12.2, 12.3
Dependencies
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area/observabilityMetrics, logging, debug endpointsMetrics, logging, debug endpointsphase/3-visibilityPhase 3: ObservabilityPhase 3: Observabilityplatform/portableCross-platform codeCross-platform codepriority/parallelCan be worked in parallelCan be worked in parallelsize/M~2-3 days of work~2-3 days of work