# Configure metric duration buckets?

**URL:** <https://forum.canton.network/t/configure-metric-duration-buckets/7140>\
**Category:** App Development\
**Tags:** canton\
**Created:** [March 1, 2024, 8:59pm UTC](https://forum.canton.network/t/configure-metric-duration-buckets/7140 "2024-03-01T20:59:19Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![WallaceKelly](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/wallacekelly/32/5046_2.png) [@WallaceKelly](https://forum.canton.network/u/WallaceKelly)\
**Post date:** [March 1, 2024, 8:59pm UTC](https://forum.canton.network/t/configure-metric-duration-buckets/7140/1 "2024-03-01T20:59:19Z")

</div>

**Question:** Is it it possible to configure the metric duration buckets? How?

* * *

Here is [an example of a duration metric](https://docs.daml.com/canton/usermanual/monitoring.html#daml-http-requests-duration-seconds). Notice that the buckets are configured with range `0.01` - `10.0`.

```plaintext
daml_http_requests_duration_seconds_bucket
{path="/v1/create",le="0.01" ,..}
{path="/v1/create",le="0.025",..}
{path="/v1/create",le="0.05" ,..}
{path="/v1/create",le="0.075",..}
{path="/v1/create",le="0.1" ,..} 
{path="/v1/create",le="0.15" ,..}
{path="/v1/create",le="0.2" ,..} 
{path="/v1/create",le="0.25" ,..}
{path="/v1/create",le="0.35" ,..}
{path="/v1/create",le="0.5" ,..} 
{path="/v1/create",le="0.75" ,..}
{path="/v1/create",le="1.0" ,..} 
{path="/v1/create",le="2.5" ,..} 
{path="/v1/create",le="5.0" ,..} 
{path="/v1/create",le="10.0" ,..}
{path="/v1/create",le="+Inf" ,..}

```

Is it possible to change the maximum bucket to `120.0` instead of `10.0`, for example.

Are these ranges hard-coded? Or dynamically adjusted at runtime based on measured values? Or configurable via a configuration file for Canton, or Prometheus, or Grafana, or OpenTelemetry, or DropWizard?

---

<div class="post-metadata">

**Author:** ![Ben\_M](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/ben_m/32/3080_2.png) [@Ben\_M](https://forum.canton.network/u/Ben_M)\
**Post date:** [March 13, 2024, 2:06am UTC](https://forum.canton.network/t/configure-metric-duration-buckets/7140/2 "2024-03-13T02:06:36Z")

</div>

There is nothing specific in the [docs.daml.com](http://docs.daml.com) as you can see.

However try these three links:

- Prometheus [TYPES OF METRICS](https://prometheus.io/docs/tutorials/understanding_metric_types/#types-of-metrics)
- Prometheus [HTTP API](https://prometheus.io/docs/prometheus/latest/querying/api/#http-api)
- Prometheus [Time series Selectors](https://prometheus.io/docs/prometheus/latest/querying/basics/#time-series-selectors)

Thanks for the question, this granular query is worth a deeper dive.

Hope this helps, BM.
