Closed JellyWX closed 4 months ago
Currently, with_label_values panics if the cardinality is incorrect: https://github.com/tikv/rust-prometheus/blob/f49c724df0e123520554664436da68e555593af0/src/counter.rs#L287
with_label_values
It would be better if this returned a Result<Self, Error> which can then be handled by the user
Result<Self, Error>
Looks like I should be using get_metric_with_label_values
get_metric_with_label_values
Currently,
with_label_values
panics if the cardinality is incorrect: https://github.com/tikv/rust-prometheus/blob/f49c724df0e123520554664436da68e555593af0/src/counter.rs#L287It would be better if this returned a
Result<Self, Error>
which can then be handled by the user