docs-v2/content/v2.0/reference/flux/stdlib/experimental/prometheus/histogramquantile.md

1.2 KiB

title description menu weight
prometheus.histogramQuantile() function The `prometheus.histogramQuantile()` function calculates quantiles on a set of values assuming the given histogram data is scraped or read from a Prometheus data source.
v2_0_ref
name parent
prometheus.histogramQuantile Prometheus
301

The prometheus.histogramQuantile() function calculates quantiles on a set of values assuming the given histogram data is scraped or read from a Prometheus data source.

Function type: Aggregate

{{% warn %}} The prometheus.histogramQuantile() function is currently experimental and subject to change at any time. By using this function, you accept the risks of experimental functions. {{% /warn %}}

import "experimental/prometheus"

prometheus.histogramQuantile(
  quantile: 0.99
)

Parameters

quantile

A value between 0.0 and 1.0 indicating the desired quantile.

Data type: Float

Examples

Calculate the 99th quantile in Prometheus data

import "experimental/prometheus"

prometheus.scrape(url: "https://example-url.com/metrics")
  |> prometheus.histogramQuantile(quantile: 0.99)