Skip to content

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

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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