Skip to content

statsToOpenMetrics() missing event_loop_lag_* fields added in ext-openswoole 26.2.0 #8

@alex-watchenterprise

Description

@alex-watchenterprise

ext-openswoole commit d40cc5b (2026-02-28) added three event loop lag fields to $server->stats(1):

  • event_loop_lag_ms
  • event_loop_lag_max_ms
  • event_loop_lag_avg_ms

These are emitted at:

  • Top level (global server)
  • Per event_workers[] entry (scoped by worker_id)
  • Per task_workers[] entry (scoped by worker_id)
  • Per reactor_threads[] entry (if applicable)

However, OpenSwoole\Core\Helper::statsToOpenMetrics() (called by
$server->stats(2)) was never updated to emit these fields, so they are
silently dropped in Prometheus output.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions