Skip to content

Publish histogram buckets for HTTP server request duration metrics #4802

Description

@ericyangliu

Is your feature request related to a problem? Please describe.

Polaris exposes HTTP server request duration metrics through Micrometer/Prometheus, but the exported HTTP timer metrics do not include histogram bucket series such as http_server_requests_seconds_bucket.

Without bucket series, Prometheus-compatible backends cannot calculate aggregable p95/p99 latency with histogram_quantile. Operators can see request count, total duration, and max duration, but cannot build percentile-based dashboards or alerts for Polaris API latency.

Observed with Polaris 1.5.0 on Kubernetes using the management metrics endpoint on port 8182.

Available series include:

  • http_server_requests_seconds
  • http_server_requests_seconds_count
  • http_server_requests_seconds_sum
  • http_server_requests_seconds_max

Expected series for percentile monitoring would include:

  • http_server_requests_seconds_bucket

Describe the solution you would like

Polaris should provide a supported way to publish Prometheus histogram buckets for HTTP server request duration metrics.

The behavior should be configurable so operators can enable histogram buckets when they need percentile-based monitoring, while deployments that do not need the extra series can keep the current cardinality profile.

Describe alternatives you have considered

Using http_server_requests_seconds_sum and http_server_requests_seconds_count only supports average latency.

Using http_server_requests_seconds_max does not provide p95/p99 latency and is too sensitive to individual outliers.

Calculating p95/p99 downstream is not possible unless Polaris emits bucketed histogram data at the source.

Additional context

This is needed for production monitoring and alerting of Polaris API latency in Prometheus-compatible systems such as Prometheus, Mimir, or Grafana Cloud.

I searched existing Polaris issues for _bucket, histogram, http_server_requests_seconds, Micrometer, Prometheus metrics, percentile, quantile, and latency metrics. I found related metrics issues, but not this specific request.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions