Package io.micrometer.spring.async
Class ThreadPoolTaskExecutorMetrics
- java.lang.Object
-
- io.micrometer.spring.async.ThreadPoolTaskExecutorMetrics
-
- All Implemented Interfaces:
io.micrometer.core.instrument.binder.MeterBinder
@NonNullApi @NonNullFields public class ThreadPoolTaskExecutorMetrics extends java.lang.Object implements io.micrometer.core.instrument.binder.MeterBinderMonitors the status ofThreadPoolTaskExecutorpools. Does not record timings on operations executed in theExecutorService, as this requires the instance to be wrapped. Timings are provided separately by wrapping the executor service withTimedThreadPoolTaskExecutor.
-
-
Constructor Summary
Constructors Constructor Description ThreadPoolTaskExecutorMetrics(org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor executor, java.lang.String name, java.lang.Iterable<io.micrometer.core.instrument.Tag> tags)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidbindTo(io.micrometer.core.instrument.MeterRegistry registry)static java.util.concurrent.Executormonitor(io.micrometer.core.instrument.MeterRegistry registry, java.lang.String name, io.micrometer.core.instrument.Tag... tags)Returns a newThreadPoolTaskExecutorwith recorded metrics.static org.springframework.scheduling.concurrent.ThreadPoolTaskExecutormonitor(io.micrometer.core.instrument.MeterRegistry registry, java.lang.String name, java.lang.Iterable<io.micrometer.core.instrument.Tag> tags)Returns a newThreadPoolTaskExecutorwith recorded metrics.
-
-
-
Method Detail
-
monitor
public static org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor monitor(io.micrometer.core.instrument.MeterRegistry registry, java.lang.String name, java.lang.Iterable<io.micrometer.core.instrument.Tag> tags)Returns a newThreadPoolTaskExecutorwith recorded metrics.- Parameters:
registry- The registry to bind metrics to.name- The name prefix of the metrics.tags- Tags to apply to all recorded metrics.- Returns:
- The instrumented executor, proxied.
-
monitor
public static java.util.concurrent.Executor monitor(io.micrometer.core.instrument.MeterRegistry registry, java.lang.String name, io.micrometer.core.instrument.Tag... tags)Returns a newThreadPoolTaskExecutorwith recorded metrics.- Parameters:
registry- The registry to bind metrics to.name- The name prefix of the metrics.tags- Tags to apply to all recorded metrics.- Returns:
- The instrumented executor, proxied.
-
bindTo
public void bindTo(io.micrometer.core.instrument.MeterRegistry registry)
- Specified by:
bindToin interfaceio.micrometer.core.instrument.binder.MeterBinder
-
-