use of io.micrometer.core.instrument.step.StepDistributionSummary in project micrometer by micrometer-metrics.
the class SimpleMeterRegistry method newDistributionSummary.
@Override
protected DistributionSummary newDistributionSummary(Meter.Id id, DistributionStatisticConfig distributionStatisticConfig, double scale) {
DistributionStatisticConfig merged = distributionStatisticConfig.merge(DistributionStatisticConfig.builder().expiry(config.step()).build());
DistributionSummary summary;
switch(config.mode()) {
case CUMULATIVE:
summary = new CumulativeDistributionSummary(id, clock, merged, scale, false);
break;
case STEP:
default:
summary = new StepDistributionSummary(id, clock, merged, scale, false);
break;
}
HistogramGauges.registerWithCommonFormat(summary, this);
return summary;
}
Aggregations