Interface ExecutorServiceMetricsContributor
@Internal
public interface ExecutorServiceMetricsContributor
Contributes metrics for executor service implementations that need custom binding.
- Since:
- 6.0.0
-
Method Summary
Modifier and TypeMethodDescriptionbindTo(io.micrometer.core.instrument.MeterRegistry meterRegistry, ExecutorService executorService, String name, List<io.micrometer.core.instrument.Tag> tags) Bind metrics for the executor service.default ExecutorServicebindTo(io.micronaut.context.BeanProvider<io.micrometer.core.instrument.MeterRegistry> meterRegistryProvider, ExecutorService executorService, String name, List<io.micrometer.core.instrument.Tag> tags) Bind metrics, resolving the registry only when the contributor needs it.booleansupports(ExecutorService executorService)
-
Method Details
-
supports
- Parameters:
executorService- The executor service- Returns:
- Whether this contributor handles the executor service
-
bindTo
default ExecutorService bindTo(io.micronaut.context.BeanProvider<io.micrometer.core.instrument.MeterRegistry> meterRegistryProvider, ExecutorService executorService, String name, List<io.micrometer.core.instrument.Tag> tags) Bind metrics, resolving the registry only when the contributor needs it. Contributors may override this method to defer registration while application infrastructure is being initialized.- Parameters:
meterRegistryProvider- The meter registry providerexecutorService- The executor servicename- The bean nametags- The tags- Returns:
- The executor service bean to keep
- Since:
- 6.0.3
-
bindTo
ExecutorService bindTo(io.micrometer.core.instrument.MeterRegistry meterRegistry, ExecutorService executorService, String name, List<io.micrometer.core.instrument.Tag> tags) Bind metrics for the executor service.- Parameters:
meterRegistry- The meter registryexecutorService- The executor servicename- The bean nametags- The tags- Returns:
- The executor service bean to keep
-