mirror of
https://github.com/prometheus/statsd_exporter.git
synced 2024-11-13 10:51:06 +00:00
use summary options defaults in registry
Signed-off-by: glightfoot <glightfoot@rsglab.com>
This commit is contained in:
parent
58aed41ff2
commit
66a63a8c1f
1 changed files with 8 additions and 1 deletions
|
@ -300,10 +300,17 @@ func (r *Registry) GetSummary(metricName string, labels prometheus.Labels, help
|
|||
if mapping != nil && mapping.SummaryOptions != nil && len(mapping.SummaryOptions.Quantiles) > 0 {
|
||||
quantiles = mapping.SummaryOptions.Quantiles
|
||||
}
|
||||
summaryOptions := mapper.SummaryOptions{}
|
||||
|
||||
summaryOptions := mapper.SummaryOptions{
|
||||
MaxAge: r.Mapper.Defaults.SummaryOptions.MaxAge,
|
||||
AgeBuckets: r.Mapper.Defaults.SummaryOptions.AgeBuckets,
|
||||
BufCap: r.Mapper.Defaults.SummaryOptions.BufCap,
|
||||
}
|
||||
|
||||
if mapping != nil && mapping.SummaryOptions != nil {
|
||||
summaryOptions = *mapping.SummaryOptions
|
||||
}
|
||||
|
||||
objectives := make(map[float64]float64)
|
||||
for _, q := range quantiles {
|
||||
objectives[q.Quantile] = q.Error
|
||||
|
|
Loading…
Reference in a new issue