dlmarion commented on issue #2423: URL: https://github.com/apache/accumulo/issues/2423#issuecomment-1022250670
So, our ThreadPools class calls a method in our MetricsUtils class that creates a Micrometer ExecutorServiceMetrics object which ultimately creates several Meters and registers them (https://github.com/micrometer-metrics/micrometer/blob/main/micrometer-core/src/main/java/io/micrometer/core/instrument/binder/jvm/ExecutorServiceMetrics.java#L316). The registered Meters are added with a `name` tag. There is a way to remove Meters from the MeterRegistry (MeterRegistry.remove), but we don't have a direct reference to the Meters that ExecutorServiceMetrics creates. We would have to use the `Search` class to look them up and then remove them. > I am not sure if it's useful to instrument and report metrics on short lived thread pools. I am going down this path, not because it's not useful for short lived thread pools, but because there is no easy way to remove the Meters when the thread pool is shut down. My plan is to conditionally create metrics for ThreadPools, and then only do it when the ThreadPool lives for the duration of the VM. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
