Closed timebug closed 4 years ago
ping @knyar
Could you please provide a bit more details and describe how you are hitting this? Ideally key index and the metric dict should have the same keys.
Also note that you will need to adjust tests as well.
@knyar I added the description and fixed tests.
This looks good. Thanks a lot for submitting a PR, providing more details and adjusting tests!
Fix getting key error when key not found.
When I registers a counter and a histogram like this:
metric_response_sizes
covering a range from 10 byte to 1000000 byte as bucket boundaries, functionlookup_or_create
will added all the buckets toself._key_index
whenmetric_response_sizes:observe
be called at first time, if there is no one response size less than 10 byte, the related key was not created inself._dict
. Then we callmetric_requests:reset
this kind of error log will appears.