diff --git a/prometheus/reporter.go b/prometheus/reporter.go index 4ea9f622..df5ee3b9 100644 --- a/prometheus/reporter.go +++ b/prometheus/reporter.go @@ -369,6 +369,10 @@ func (r *reporter) AllocateCounter(name string, tags map[string]string) tally.Ca return &cachedMetric{counter: counterVec.With(tags)} } +// DeallocateCounter implements tally.CachedStatsReporter. +// This is currently a nop method. +func (r *reporter) DeallocateCounter(tally.CachedCount) {} + func (r *reporter) RegisterGauge( name string, tagKeys []string, @@ -418,6 +422,10 @@ func (r *reporter) AllocateGauge(name string, tags map[string]string) tally.Cach return &cachedMetric{gauge: gaugeVec.With(tags)} } +// DeallocateGauge implements tally.CachedStatsReporter. +// This is currently a nop method. +func (r *reporter) DeallocateGauge(tally.CachedGauge) {} + func (r *reporter) RegisterTimer( name string, tagKeys []string, @@ -557,6 +565,10 @@ func (r *reporter) AllocateTimer(name string, tags map[string]string) tally.Cach return timer } +// DeallocateTimer implements tally.CachedStatsReporter. +// This is currently a nop method. +func (r *reporter) DeallocateTimer(tally.CachedTimer) {} + func (r *reporter) AllocateHistogram( name string, tags map[string]string, @@ -571,6 +583,10 @@ func (r *reporter) AllocateHistogram( return &cachedMetric{histogram: histogramVec.With(tags)} } +// DeallocateHistogram implements tally.CachedStatsReporter. +// This is currently a nop method. +func (r *reporter) DeallocateHistogram(tally.CachedHistogram) {} + func (r *reporter) Capabilities() tally.Capabilities { return r }