The ctor for DotNetRuntimeStatsCollector updates the static dictionary Instances under the _lockInstance lock, which is not itself static.
Same problem when disposing of course.
This means any two or more DotNetRuntimeStatsCollectors created will end up updating the dictionary.
The solution would be to make the lock static.
The ctor for
DotNetRuntimeStatsCollectorupdates the static dictionaryInstancesunder the_lockInstancelock, which is not itself static.Same problem when disposing of course.
This means any two or more
DotNetRuntimeStatsCollectors created will end up updating the dictionary.The solution would be to make the lock static.