This is a way to auto-configure client percentiles

management:
  metrics:
    distribution:
      percentiles:
        http.server.requests: 0.9

which ends up in this place, without capability to set expiry.

Why not adding the capability to configure also the sliding window of the quantile, which currently seems to be defaulting to 2m

Comment From: wilkinsona

Thanks for the suggestion, @hadjiski. That sounds like a good idea to me. We could add a property named expiry of type Map<String, Duration> to org.springframework.boot.actuate.autoconfigure.metrics.MetricsProperties.Distribution. It would be configured using management.metrics.distribution.expiry.

Comment From: hadjiski

@wilkinsona nice and quick, just for my understanding: the expiry property would also influence the percentiles-histogram? Only then it would make sense to be directly under management.metrics.distribution. Besides, is expiry the best name for it? I know this is how Micrometer named it, but it has more to do with the window/period/interval for the percentile calculation. Would you also have other suggestions for the name?

Comment From: wilkinsona

expiry is used in several different places, including both TimeWindowPercentileHistogram and TimeWindowFixedBoundaryHistogram via their common super-class.

i can’t speak for the Micrometer team, but I suspect the use of the property in multiple places influenced its name. While window may work well for the histograms, it’s perhaps less appropriate for the other uses. Regardless, we try to align with the names used in the underlying technology so the Spring Boot property should be named expiry in this case. If you think the name could be improved please make that suggestion to the Micrometer team.

Comment From: wilkinsona

I wonder if we should provide a property for the buffer length as well. WDYT, @shakuzen?

Comment From: hadjiski

@jonatan-ivanov

Comment From: jonatan-ivanov

We were discussing about this with @hadjiski on Micrometer Slack, I think adding the buffer length with the expiry property would make sense.

Comment From: polarbear567

Hi @wilkinsona , I am trying to fix this issue, but during the test, I think I found a bug. When the value of the map is of type XXX, it will not be mapped correctly if "[]" is not used on the key in the yaml file. Although I don't think this bug will affect the current issue, I opened an issue with a detailed description of the bug and a runnable case. Issue

Comment From: snicoll

Closing in favor of PR #27584