Closed Grryum closed 1 year ago
This seems like a good workaround for now, thank you @Grryum. However, I don't understand why this failed in the first place. Since we stored the AtomicDouble in the
activeGauges
map, I would have assumed that we will always have a strong reference for it so theWeakReference
inside the micrometer registry should never be emptied.
@petoalbert to be honest, I couldn’t reproduce this bug and also don’t really understand how it may be. Those changes are done to prevent such rare cases. Besides, using micrometer strong reference for gauges does not affect the overall performance
Closes #45