Skip to content

Telemetry API (metrics, tracing, structured logs) #5

Description

@EdmondDantes

Expose a first-class telemetry API so operators can observe the server in production.

Scope

  • Metrics — counters, gauges, histograms for: accepted connections, active connections per protocol, request rate, request duration, response status classes, bytes in/out, TLS handshake duration, HTTP/2 stream concurrency, HTTP/3 packet rates, CoDel pause events, queue depth.
  • Prometheus-compatible text exposition endpoint (opt-in).
  • Tracing — OpenTelemetry-compatible spans for accept → parse → dispatch → respond, with context propagation from traceparent header.
  • Structured logs — JSON-formatted access log with configurable fields.
  • PHP-side hooks: $server->onMetric(), $server->onSpan() so user code can emit custom telemetry on the same pipeline.
  • Zero-cost when telemetry is disabled (compile-time and runtime).

Acceptance

  • Prometheus scrapes the endpoint successfully and renders the standard server dashboard.
  • OTel collector receives spans with correct parent/child relationships.
  • No measurable throughput regression with telemetry off; <5% with metrics on.

Activity

  1. added this to the Next milestone on Apr 30, 2026
  2. self-assigned this
    on May 6, 2026
  3. added
    enhancement
    on May 6, 2026
  4. modified the milestones: Next, Next2 on May 16, 2026
  5. moved this from Todo to In Progress in True Async Boardon Jul 10, 2026
  6. added a commit that references this issue on Jul 10, 2026
  7. added 2 commits that reference this issue on Jul 12, 2026
  8. moved this from In Progress to Done in True Async Boardon Jul 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancement

Projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions