You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It is implied that counter start from 0, since counter value after its first inc(1) will be 1.
But metric value do not exist until first inc() call (since there are no other methods to change counter metric value). So if value if never changed, metric will be null.
For example, it is a common case to count process errors with counter. But if we did not have any errors from the start, the metric will be null. HTTP activity is the same (#96): it is more convenient to know that we had 0 requests on some route rather then no data. No data if often treated like "there is something wrong with metric retrieval" rather then "it's a plain zero".
It is now possible to initialize counter with specific labels with
counter:inc(0, label_pairs)
but it is definitely a duct tape. It would be better to support this behavior explicitly, e.g. with some collector method.
The text was updated successfully, but these errors were encountered:
It is implied that counter start from 0, since counter value after its first
inc(1)
will be1
.But metric value do not exist until first
inc()
call (since there are no other methods to change counter metric value). So if value if never changed, metric will be null.For example, it is a common case to count process errors with counter. But if we did not have any errors from the start, the metric will be null. HTTP activity is the same (#96): it is more convenient to know that we had
0
requests on some route rather thenno data
.No data
if often treated like "there is something wrong with metric retrieval" rather then "it's a plain zero".It is now possible to initialize counter with specific labels with
but it is definitely a duct tape. It would be better to support this behavior explicitly, e.g. with some collector method.
The text was updated successfully, but these errors were encountered: