Skip to content

Commit

Permalink
deprecate top level quantiles and buckets
Browse files Browse the repository at this point in the history
  • Loading branch information
tgummerer committed Jan 29, 2020
1 parent 90d2b0f commit 0fa730a
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions pkg/mapper/mapper.go
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,16 @@ func (m *MetricMapper) InitFromYAMLString(fileContents string, cacheSize int) er
currentMapping.TimerType = n.Defaults.TimerType
}

if currentMapping.Quantiles != nil &&
(currentMapping.SummaryOptions == nil || currentMapping.SummaryOptions.Quantiles != nil) {
log.Warn("using the top level quantiles is deprecated. Please use quantiles in the summary_options hierarchy")
}

if currentMapping.Buckets != nil &&
(currentMapping.HistogramOptions == nil || currentMapping.HistogramOptions.Buckets != nil) {
log.Warn("using the top level buckets is deprecated. Please use buckets in the histogram_options hierarchy")
}

if currentMapping.SummaryOptions != nil &&
currentMapping.Quantiles != nil &&
currentMapping.SummaryOptions.Quantiles != nil {
Expand Down

0 comments on commit 0fa730a

Please sign in to comment.