From 90efb4ee9747bb7f1f4334ff41ed227e131fb045 Mon Sep 17 00:00:00 2001 From: beorn7 Date: Wed, 26 Jun 2024 19:17:45 +0200 Subject: [PATCH] play more Signed-off-by: beorn7 --- examples/random/main.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/examples/random/main.go b/examples/random/main.go index 82ccc65..f481356 100644 --- a/examples/random/main.go +++ b/examples/random/main.go @@ -116,11 +116,9 @@ func main() { m.rpcDurationsHistogram.(prometheus.ExemplarObserver).ObserveWithExemplar( 0, prometheus.Labels{"dummyID": fmt.Sprint(rand.Intn(100000))}, ) - m.rpcDurationsHistogram.(prometheus.ExemplarObserver).ObserveWithExemplar( - 0.01, prometheus.Labels{"dummyID": fmt.Sprint(rand.Intn(100000))}, - ) + for { - v := (rand.NormFloat64() * *normDomain) + *normMean + v := math.Abs((rand.NormFloat64() * *normDomain) + *normMean) m.rpcDurations.WithLabelValues("normal").Observe(v) // Demonstrate exemplar support with a dummy ID. This // would be something like a trace ID in a real