发布

  • feat(supervisor): publish client-side dequeue API latency as a Prometheus histogram (#3887)

    frostbyte_neo 发布于 2026-06-10 14:35:02 +00:00 | 742 次提交 在此版本后已推送到 main

    The supervisor's dequeue round-trip time (POST /engine/v1/worker-actions/dequeue) was measured but only flowed into
    wide events and OTel span attributes — there was no Prometheus series,
    so latency percentiles and error rates weren't queryable. This adds
    queue_consumer_pool_dequeue_duration_seconds (histogram, label
    outcome=success|empty|error) to the existing consumer-pool metrics,
    scraped automatically by the existing ServiceMonitors on
    queue-raider/schedule-raider/supervisor.

    • Records every dequeue call, including failed ones, which previously
      emitted no timing at all
    • The pool's shared ConsumerPoolMetrics instance is injected into each
      consumer (mirrors the BackpressureMetricsBackpressureMonitor
      wiring)
    • Buckets extend to 30s because wrapZodFetch retries internally (5
      attempts, ≥7.5s backoff before a retryable error surfaces)
    • Existing dequeueResponseMs wide-event/span behavior unchanged
    下载附件