open-o11y / prometheus-sample-app

A sample app that generates Prometheus metrics
10 stars 6 forks source link

Prometheus-Sample-App gauge metric value only goes up #7

Closed mustafain117 closed 2 years ago

mustafain117 commented 3 years ago

Describe the bug

Prometheus gauge metric represents value that can go up and down. However, Gauge metric produced by this app currently only goes up.

What did you expect to see?

Expected to see gauge value go both up and down instead of being monotonically increasing.

Possible Solution

In function updateGauge() to c.Set(rand.Float64()). This should make gauge value go both ways - up and down.

Additional context Related to open-telemetry/wg-prometheus#57 cc @alolita @Aneurysm9

PaurushGarg commented 2 years ago

Merged as part of PR #11