@NonNullApi @NonNullFields public class ExecutorServiceMetrics extends java.lang.Object implements MeterBinder
ExecutorService
,
as this requires the instance to be wrapped. Timings are provided separately by wrapping the executor service
with TimedExecutorService
.Constructor and Description |
---|
ExecutorServiceMetrics(java.util.concurrent.ExecutorService executorService,
java.lang.String executorServiceName,
java.lang.Iterable<Tag> tags) |
ExecutorServiceMetrics(java.util.concurrent.ExecutorService executorService,
java.lang.String executorServiceName,
java.lang.String metricPrefix,
java.lang.Iterable<Tag> tags)
Create an
ExecutorServiceMetrics instance. |
Modifier and Type | Method and Description |
---|---|
void |
bindTo(MeterRegistry registry) |
static java.util.concurrent.ExecutorService |
monitor(MeterRegistry registry,
java.util.concurrent.ExecutorService executor,
java.lang.String executorServiceName,
java.lang.Iterable<Tag> tags)
Record metrics on the use of an
ExecutorService . |
static java.util.concurrent.ExecutorService |
monitor(MeterRegistry registry,
java.util.concurrent.ExecutorService executor,
java.lang.String executorServiceName,
java.lang.String metricPrefix,
java.lang.Iterable<Tag> tags)
Record metrics on the use of an
ExecutorService . |
static java.util.concurrent.ExecutorService |
monitor(MeterRegistry registry,
java.util.concurrent.ExecutorService executor,
java.lang.String executorServiceName,
java.lang.String metricPrefix,
Tag... tags)
Record metrics on the use of an
ExecutorService . |
static java.util.concurrent.ExecutorService |
monitor(MeterRegistry registry,
java.util.concurrent.ExecutorService executor,
java.lang.String executorServiceName,
Tag... tags)
Record metrics on the use of an
ExecutorService . |
static java.util.concurrent.Executor |
monitor(MeterRegistry registry,
java.util.concurrent.Executor executor,
java.lang.String executorName,
java.lang.Iterable<Tag> tags)
Record metrics on the use of an
Executor . |
static java.util.concurrent.Executor |
monitor(MeterRegistry registry,
java.util.concurrent.Executor executor,
java.lang.String executorName,
java.lang.String metricPrefix,
java.lang.Iterable<Tag> tags)
Record metrics on the use of an
Executor . |
static java.util.concurrent.Executor |
monitor(MeterRegistry registry,
java.util.concurrent.Executor executor,
java.lang.String executorName,
java.lang.String metricPrefix,
Tag... tags)
Record metrics on the use of an
Executor . |
static java.util.concurrent.Executor |
monitor(MeterRegistry registry,
java.util.concurrent.Executor executor,
java.lang.String executorName,
Tag... tags)
Record metrics on the use of an
Executor . |
static java.util.concurrent.ScheduledExecutorService |
monitor(MeterRegistry registry,
java.util.concurrent.ScheduledExecutorService executor,
java.lang.String executorServiceName,
java.lang.Iterable<Tag> tags)
Record metrics on the use of a
ScheduledExecutorService . |
static java.util.concurrent.ScheduledExecutorService |
monitor(MeterRegistry registry,
java.util.concurrent.ScheduledExecutorService executor,
java.lang.String executorServiceName,
java.lang.String metricPrefix,
java.lang.Iterable<Tag> tags)
Record metrics on the use of a
ScheduledExecutorService . |
static java.util.concurrent.ScheduledExecutorService |
monitor(MeterRegistry registry,
java.util.concurrent.ScheduledExecutorService executor,
java.lang.String executorServiceName,
java.lang.String metricPrefix,
Tag... tags)
Record metrics on the use of a
ScheduledExecutorService . |
static java.util.concurrent.ScheduledExecutorService |
monitor(MeterRegistry registry,
java.util.concurrent.ScheduledExecutorService executor,
java.lang.String executorServiceName,
Tag... tags)
Record metrics on the use of a
ScheduledExecutorService . |
public ExecutorServiceMetrics(@Nullable java.util.concurrent.ExecutorService executorService, java.lang.String executorServiceName, java.lang.Iterable<Tag> tags)
public ExecutorServiceMetrics(@Nullable java.util.concurrent.ExecutorService executorService, java.lang.String executorServiceName, java.lang.String metricPrefix, java.lang.Iterable<Tag> tags)
ExecutorServiceMetrics
instance.executorService
- executor serviceexecutorServiceName
- executor service name which will be used as name tagmetricPrefix
- metrics prefix which will be used to prefix metric nametags
- additional tagspublic static java.util.concurrent.Executor monitor(MeterRegistry registry, java.util.concurrent.Executor executor, java.lang.String executorName, java.lang.Iterable<Tag> tags)
Executor
.registry
- The registry to bind metrics to.executor
- The executor to instrument.executorName
- Will be used to tag metrics with "name".tags
- Tags to apply to all recorded metrics.public static java.util.concurrent.Executor monitor(MeterRegistry registry, java.util.concurrent.Executor executor, java.lang.String executorName, java.lang.String metricPrefix, java.lang.Iterable<Tag> tags)
Executor
.registry
- The registry to bind metrics to.executor
- The executor to instrument.executorName
- Will be used to tag metrics with "name".metricPrefix
- The prefix to use with meter names. This differentiates executor metrics that may have different tag sets.tags
- Tags to apply to all recorded metrics.public static java.util.concurrent.Executor monitor(MeterRegistry registry, java.util.concurrent.Executor executor, java.lang.String executorName, Tag... tags)
Executor
.registry
- The registry to bind metrics to.executor
- The executor to instrument.executorName
- Will be used to tag metrics with "name".tags
- Tags to apply to all recorded metrics.public static java.util.concurrent.Executor monitor(MeterRegistry registry, java.util.concurrent.Executor executor, java.lang.String executorName, java.lang.String metricPrefix, Tag... tags)
Executor
.registry
- The registry to bind metrics to.executor
- The executor to instrument.executorName
- Will be used to tag metrics with "name".metricPrefix
- The prefix to use with meter names. This differentiates executor metrics that may have different tag sets.tags
- Tags to apply to all recorded metrics.public static java.util.concurrent.ExecutorService monitor(MeterRegistry registry, java.util.concurrent.ExecutorService executor, java.lang.String executorServiceName, java.lang.Iterable<Tag> tags)
ExecutorService
.registry
- The registry to bind metrics to.executor
- The executor to instrument.executorServiceName
- Will be used to tag metrics with "name".tags
- Tags to apply to all recorded metrics.public static java.util.concurrent.ExecutorService monitor(MeterRegistry registry, java.util.concurrent.ExecutorService executor, java.lang.String executorServiceName, java.lang.String metricPrefix, java.lang.Iterable<Tag> tags)
ExecutorService
.registry
- The registry to bind metrics to.executor
- The executor to instrument.executorServiceName
- Will be used to tag metrics with "name".metricPrefix
- The prefix to use with meter names. This differentiates executor metrics that may have different tag sets.tags
- Tags to apply to all recorded metrics.public static java.util.concurrent.ExecutorService monitor(MeterRegistry registry, java.util.concurrent.ExecutorService executor, java.lang.String executorServiceName, Tag... tags)
ExecutorService
.registry
- The registry to bind metrics to.executor
- The executor to instrument.executorServiceName
- Will be used to tag metrics with "name".tags
- Tags to apply to all recorded metrics.public static java.util.concurrent.ExecutorService monitor(MeterRegistry registry, java.util.concurrent.ExecutorService executor, java.lang.String executorServiceName, java.lang.String metricPrefix, Tag... tags)
ExecutorService
.registry
- The registry to bind metrics to.executor
- The executor to instrument.executorServiceName
- Will be used to tag metrics with "name".metricPrefix
- The prefix to use with meter names. This differentiates executor metrics that may have different tag sets.tags
- Tags to apply to all recorded metrics.public static java.util.concurrent.ScheduledExecutorService monitor(MeterRegistry registry, java.util.concurrent.ScheduledExecutorService executor, java.lang.String executorServiceName, java.lang.Iterable<Tag> tags)
ScheduledExecutorService
.registry
- The registry to bind metrics to.executor
- The scheduled executor to instrument.executorServiceName
- Will be used to tag metrics with "name".tags
- Tags to apply to all recorded metrics.public static java.util.concurrent.ScheduledExecutorService monitor(MeterRegistry registry, java.util.concurrent.ScheduledExecutorService executor, java.lang.String executorServiceName, java.lang.String metricPrefix, java.lang.Iterable<Tag> tags)
ScheduledExecutorService
.registry
- The registry to bind metrics to.executor
- The scheduled executor to instrument.executorServiceName
- Will be used to tag metrics with "name".metricPrefix
- The prefix to use with meter names. This differentiates executor metrics that may have different tag sets.tags
- Tags to apply to all recorded metrics.public static java.util.concurrent.ScheduledExecutorService monitor(MeterRegistry registry, java.util.concurrent.ScheduledExecutorService executor, java.lang.String executorServiceName, Tag... tags)
ScheduledExecutorService
.registry
- The registry to bind metrics to.executor
- The scheduled executor to instrument.executorServiceName
- Will be used to tag metrics with "name".tags
- Tags to apply to all recorded metrics.public static java.util.concurrent.ScheduledExecutorService monitor(MeterRegistry registry, java.util.concurrent.ScheduledExecutorService executor, java.lang.String executorServiceName, java.lang.String metricPrefix, Tag... tags)
ScheduledExecutorService
.registry
- The registry to bind metrics to.executor
- The scheduled executor to instrument.executorServiceName
- Will be used to tag metrics with "name".metricPrefix
- The prefix to use with meter names. This differentiates executor metrics that may have different tag sets.tags
- Tags to apply to all recorded metrics.public void bindTo(MeterRegistry registry)
bindTo
in interface MeterBinder