()
| 33 | ) |
| 34 | |
| 35 | func ExampleGauge() { |
| 36 | opsQueued := prometheus.NewGauge(prometheus.GaugeOpts{ |
| 37 | Namespace: "our_company", |
| 38 | Subsystem: "blob_storage", |
| 39 | Name: "ops_queued", |
| 40 | Help: "Number of blob storage operations waiting to be processed.", |
| 41 | }) |
| 42 | prometheus.MustRegister(opsQueued) |
| 43 | |
| 44 | // 10 operations queued by the goroutine managing incoming requests. |
| 45 | opsQueued.Add(10) |
| 46 | // A worker goroutine has picked up a waiting operation. |
| 47 | opsQueued.Dec() |
| 48 | // And once more... |
| 49 | opsQueued.Dec() |
| 50 | } |
| 51 | |
| 52 | func ExampleGaugeVec() { |
| 53 | opsQueued := prometheus.NewGaugeVec( |
nothing calls this directly
no test coverage detected