OBSERVABILITY, METRICS & DISTRIBUTED TRACING
Operating production edge security infrastructure requires real-time visibility. Hackergate emits granular Prometheus metrics, exports OpenTelemetry (OTel) traces across microservice boundaries, and formats structured JSON audit events adhering to modern observability standards.
Prometheus Metrics Engine (:9090/metrics)
Hackergate runs a dedicated, lightweight HTTP metrics server on port 9090 completely isolated from public dataplane traffic.
| Metric Identifier | Type | Labels | Description |
|---|---|---|---|
hackergate_requests_total | Counter | host, status, protocol, vhost | Total count of processed requests partitioned by HTTP response code. |
hackergate_request_duration_seconds | Histogram | vhost, backend_driver | Latency distribution from TLS handshake receipt to final byte delivery. |
hackergate_waf_blocked_total | Counter | vhost, rule_id, category, paranoia | Count of blocked requests partitioned by OWASP CRS rule ID and severity. |
hackergate_gossip_events_total | Counter | origin_node, action, status | Decentralized threat gossip event volume sent and received across mesh. |
hackergate_cache_hit_ratio | Gauge | shard_id | Threat intelligence cache hit ratio across the 64 lock-striped shards. |
hackergate_pow_challenges_total | Counter | vhost, result (issued/solved/failed) | Cryptographic browser proof-of-work challenge state transitions. |
hackergate_active_connections | Gauge | protocol (http1, http2, http3) | Current live client connections open on edge sockets. |
OpenTelemetry (OTel) Distributed Tracing
When downstream microservices use Jaeger, Grafana Tempo, or Datadog, Hackergate injects and propagates standard W3C traceparent headers. The gateway generates granular child spans measuring:
TLS Handshake Span
Measures crypto negotiation latency (TLS 1.3 0-RTT vs 1-RTT, ALPN protocol selection, and client cipher suite parsing).
WAF Inspection Span
Records execution duration for Coraza CRS Phase 1 (headers) and Phase 2 (body stream), tagged with evaluated rule IDs.
Upstream Proxy Span
Measures time spent establishing connections to backend origins, Time to First Byte (TTFB), and full response streaming.
Structured JSON Access & Audit Logs
Hackergate produces machine-readable JSON logs ready for ingestion by Vector, FluentBit, Logstash, or OpenSearch:
Container Health & Readiness Probes
For Kubernetes and cloud load balancer integration, Hackergate exposes unauthenticated probes on port 8080:
GET /healthz (Liveness)
Returns HTTP 200 immediately if the Go event loop and socket listeners are functional. Kubelet restarts container if this fails.
GET /readyz (Readiness)
Verifies that virtual host definitions are loaded, TLS certificates are valid, and at least one upstream origin is healthy.