THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
Please keep the discussion on the mailing list rather than commenting on the wiki (wiki discussions get unwieldy fast).
Motivation
The Metrics
registry is often used by concurrent threadsConcurrent thread may try to access the Metrics registry to create the same, instance-level metric, however it's get/create APIs are not well suited for it. A common pattern from the user that users follow today is:
Code Block |
---|
metric = metrics.metric(metricName); if (metric == null) { try { metrics.addMetric(..) } catch (IllegalArgumentException e){ // another thread may create the metric at the mean time } } |
...