forked from mirrors/statsd_exporter
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 {
|
if mapping != nil && mapping.SummaryOptions != nil && len(mapping.SummaryOptions.Quantiles) > 0 {
|
||||||
quantiles = mapping.SummaryOptions.Quantiles
|
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 {
|
if mapping != nil && mapping.SummaryOptions != nil {
|
||||||
summaryOptions = *mapping.SummaryOptions
|
summaryOptions = *mapping.SummaryOptions
|
||||||
}
|
}
|
||||||
|
|
||||||
objectives := make(map[float64]float64)
|
objectives := make(map[float64]float64)
|
||||||
for _, q := range quantiles {
|
for _, q := range quantiles {
|
||||||
objectives[q.Quantile] = q.Error
|
objectives[q.Quantile] = q.Error
|
||||||
|
|
Loading…
Reference in a new issue