Skip to content

[BUG] Prometheus histogram buckets for request latency are misconfigured, making P99 dashboards meaningless #888

Open

Description

@meshackyaro

Bug Description

The latency histogram's bucket boundaries top out at 500ms, so any request slower than that (which, under load, is common) all land in the +Inf bucket with no resolution.

Component

  • Backend
  • Frontend
  • Smart Contract
  • SDK
  • Documentation
  • Other:

Steps to Reproduce

  1. Generate some slow requests (e.g. >1s) under load.
  2. Query the http_request_duration_seconds histogram in Prometheus.
  3. Compute a P99 using histogram_quantile.
  4. Compare the estimated value against actual observed latencies from logs.

Expected Behavior

Buckets should cover the realistic latency range with enough resolution above 500ms to make P95/P99 meaningful.

Actual Behavior

All slow requests collapse into the +Inf bucket, so histogram_quantile either returns +Inf or a wildly inaccurate estimate for P95/P99.

Environment

  • Node Version: 20.x
  • OS: Linux / macOS
  • Browser (if applicable): N/A
  • Network (Testnet/Mainnet): Testnet

Error Messages/Logs

N/A — no error output; behavior is incorrect but silent.

Screenshots

N/A — backend/API issue, not applicable.

Additional Context

Bucket boundaries were presumably tuned against a dev environment's much faster typical latency.

Possible Solution

Widen/extend the bucket boundaries (e.g. up to 10s with finer granularity in the 100ms-2s range) based on real production latency distribution.

Activity

  1. added
    bug
    difficulty: easy
    priority: medium
    on Oct 29, 2026
  2. ranjan1969x commented on Nov 2, 2026

    @ranjan1969x

    Hello team,

    I reviewed the issue for Prometheus histogram buckets for request latency are misconfigured, making P99 dashboards meaningless. We need to resolve 'prometheus histogram buckets for request latency are misconfigured, making p99 dashboards meaningless' cleanly across the target modules.

    Proposed Implementation:

    1. Trace the current code execution path to isolate the behavior boundary.
    2. Implement a focused, modular fix for 'Prometheus histogram buckets for request latency are misconfigured, making P99 dashboards meaningless' adhering strictly to repository architecture.
    3. Ensure defensive guards and backward compatibility are maintained.

    Testing & Verification:
    I will reproduce the target scenario locally, add regression unit tests, and confirm all CI checks pass 100% green.

    Please assign this to me and I'll submit the PR with passing CI.

  3. rupesh-kumar-sah commented on Nov 7, 2026

    @rupesh-kumar-sah

    Hi maintainers,

    I reviewed "[BUG] Prometheus histogram buckets for request latency are misconfigured, making P99 dashboards meaningless" and have a structured approach ready for implementation:

    I have reviewed the problem description and acceptance criteria for this issue. I have a clear, tested implementation ready with defensive error handling and 100% green CI proof.

    I will deliver a clean, well-tested, and production-ready PR promptly upon assignment. Kindly assign this issue to me.

    Thank you!

  4. GangDev6707 commented on Nov 8, 2026

    @GangDev6707

    Hey everyone,

    I'd like to help resolve this issue. We need to resolve 'prometheus histogram buckets for request latency are misconfigured, making p99 dashboards meaningless' cleanly across the target modules. I plan to trace the current code execution path to isolate the behavior boundary and implement a focused, modular fix for 'prometheus histogram buckets for request latency are misconfigured, making p99 dashboards meaningless' adhering strictly to repository architecture, followed by ensure defensive guards and backward compatibility are maintained.

    I'll reproduce the target scenario locally, add regression unit tests, and confirm all CI checks pass 100% green to verify everything passes cleanly.

    Please assign this to me, ready to submit a tested patch with zero regressions.

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

    bugdevopsdifficulty: easyinfrastructurepriority: medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions