-
Notifications
You must be signed in to change notification settings - Fork 965
Open
Labels
release:after-gaNot required before GA release, and not going to work on before GANot required before GA release, and not going to work on before GAspec:metricsRelated to the specification/metrics directoryRelated to the specification/metrics directory
Description
Current spec for UpDownCounters
.inc(5)
.inc(-5)
If the state is based on, for example, the length of an array (eg a list of connected clients), this requires the previous state to be stored somewhere so that subtraction can happen.
Proposal:
.set(25)
Allow the instrument to be set, this can be then used to map to properties of data structures which inform this and remove the need for diffing. This is possible with an observer but using this required substantial changes to our app and exposing state where we don’t want to. With a synchronous set method, this can be done within methods without exposing internal state to observers.
The Nodejs package ‘prom-client’ has this functionality already and we find it very useful.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
release:after-gaNot required before GA release, and not going to work on before GANot required before GA release, and not going to work on before GAspec:metricsRelated to the specification/metrics directoryRelated to the specification/metrics directory