SimpleCounter is a simple counter that can only be incremented.
| 191 | |
| 192 | // SimpleCounter is a simple counter that can only be incremented. |
| 193 | type SimpleCounter interface { |
| 194 | // Increment increments the counter by 1 |
| 195 | // |
| 196 | // - labels is a set of labels to apply. Can be created using the Label function. |
| 197 | Increment(labels ...MetricLabel) |
| 198 | |
| 199 | // IncrementBy increments the counter by the specified number. Only returns an error if the passed by parameter is |
| 200 | // negative. |
| 201 | // |
| 202 | // - labels is a set of labels to apply. Can be created using the Label function. |
| 203 | IncrementBy(by float64, labels ...MetricLabel) error |
| 204 | } |
| 205 | |
| 206 | // Counter extends the SimpleCounter interface by adding a WithLabels function to create a copy of the counter that |
| 207 | // is primed with a set of labels. |
nothing calls this directly
no outgoing calls
no test coverage detected