Open randysecrist opened 6 years ago
Just wanted to be clear that there was a use for it before introducing. Seems like alerting on a min is a rare thing, but there is probably a real world case somewhere. What are you thinking of doing?
BTW, workaround is a P0 percentile:
@Test
void minimum() {
DistributionSummary summary = DistributionSummary.builder("my.summary")
.publishPercentiles(0)
.register(new SimpleMeterRegistry());
// dummy data
for (int i = 1; i < 10; i++) {
summary.record(i);
}
assertThat(summary.percentile(0)).isEqualTo(1);
}
Micrometer's client-side percentiles are designed to decay in the same way max does. P0 can be interpolated, but it's something.
Historical monitoring of snapshots (but not necessarily alert) a distribution summary for say ... minimum values for something like say ... request size. All the other relevant stats are there; just seems to be missing this one.
Reason I'm seeking concrete use cases is we should determine whether this is an always-on thing or an option to select. Leaning towards the latter unless there are an overwhelming number of use cases.
Request size has an interesting characteristic that it has a natural lower bound (request header size). Interestingly, it means request size essentially is never normally distributed and standard deviation is useless, but I digress...
Would you alert on min size?
My thought was to track request size only for something like POST or PUT; since as you say the natural lower bound for a GET or HEAD request would typically be just the header + query string.
In the case of using HTTP for incoming writes; I would only alert if the use case was below the expected minimum; if that is even knowable for a given use case ... and that really depends on the application imo.
Sounds like default off with an option to turn it on would be OK then?
Ya, I think that would work. Thanks!
This would be useful for the StackDriver Range aggregate as well.
When implemented, fix min statistic on Azure App Insights implementation as well. #441.
This would also be useful while reporting to Cloudwatch where you could use StatisticSets: https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_StatisticSet.html
Instead of emitting each value separately in the reporter: https://github.com/micrometer-metrics/micrometer/blob/b604d1d89f125741437f84c934b68f2a429ff4e8/implementations/micrometer-registry-cloudwatch/src/main/java/io/micrometer/cloudwatch/CloudWatchMeterRegistry.java#L200-L207
to enable the adjustments for Cloudwatch. i added min value to micrometer. on branch 1.3.x pullrequest
Quick question ...
Why doesn't https://github.com/micrometer-metrics/micrometer/blob/master/micrometer-core/src/main/java/io/micrometer/core/instrument/distribution/HistogramSnapshot.java have a min function?