Current sample and Scope API by shakuzen · Pull Request #2871 · micrometer-metrics/micrometer (original) (raw)
and others added 7 commits
The tests demonstrate some scenarios and check the expected behavior.
An experiment with changing to InheritableThreadLocal is included. The commented code in TimedRunnable is not needed thanks to InheritableThreadLocal, but if uncommented that code can make things work with a regular ThreadLocal.
The startedAndStoppedOnDifferentThread test does not pass either way.
Switches back to ThreadLocal from InheritableThreadLocal since we still need to handle instrumenting runnables when threads are re-used in a pool.
Adds some more test cases demonstrating things that should work.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
[ Show hidden characters]({{ revealButtonHref }})