Skip to content

Commit d34e217

Browse files
MaxFandoaldas
authored andcommitted
fix example ObserveCustomDur
m.customCnt -> m.customDur
1 parent e1b0cba commit d34e217

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

website/content/middleware/prometheus.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ func (m *Metrics) IncCustomCnt(labelOne, labelTwo string) {
121121

122122
func (m *Metrics) ObserveCustomDur(labelOne, labelTwo string, d time.Duration) {
123123
labels := prom.Labels{"label_one": labelOne, "label_two": labelTwo}
124-
m.customCnt.MetricCollector.(*prom.HistogramVec).With(labels).Observe(d.Seconds())
124+
m.customDur.MetricCollector.(*prom.HistogramVec).With(labels).Observe(d.Seconds())
125125
}
126126

127127
func main() {

0 commit comments

Comments
 (0)