NewCounterFunc creates a new CounterFunc based on the provided CounterOpts. The value reported is determined by calling the given function from within the Write method. Take into account that metric collection may happen concurrently. If that results in concurrent calls to Write, like in the case wh
(opts CounterOpts, function func() float64)
| 349 | // |
| 350 | // Check out the ExampleGaugeFunc examples for the similar GaugeFunc. |
| 351 | func NewCounterFunc(opts CounterOpts, function func() float64) CounterFunc { |
| 352 | return newValueFunc(NewDesc( |
| 353 | BuildFQName(opts.Namespace, opts.Subsystem, opts.Name), |
| 354 | opts.Help, |
| 355 | nil, |
| 356 | opts.ConstLabels, |
| 357 | ), CounterValue, function) |
| 358 | } |
no test coverage detected