Package io.quarkus.runtime.metrics
Interface MetricsFactory
-
public interface MetricsFactory
Extensions can create or register metrics using this factory independent of the enabled metrics provider
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
MetricsFactory.MetricBuilder
static interface
MetricsFactory.TimeRecorder
A time recorder that tracks elapsed time using incremental updates using a duration with a specified time unit.static class
MetricsFactory.Type
Registry type or scope.
-
Field Summary
Fields Modifier and Type Field Description static String
MICROMETER
A well-known string for Micrometer metrics provided by the Micrometer Metrics quarkus extensionstatic String
MP_METRICS
A well-known string for MicroProfile metrics provided by the SmallRye Metrics quarkus extension
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default MetricsFactory.MetricBuilder
builder(String name)
MetricsFactory.MetricBuilder
builder(String name, MetricsFactory.Type type)
boolean
metricsSystemSupported(String name)
-
-
-
Field Detail
-
MP_METRICS
static final String MP_METRICS
A well-known string for MicroProfile metrics provided by the SmallRye Metrics quarkus extension- See Also:
- Constant Field Values
-
MICROMETER
static final String MICROMETER
A well-known string for Micrometer metrics provided by the Micrometer Metrics quarkus extension- See Also:
- Constant Field Values
-
-
Method Detail
-
metricsSystemSupported
boolean metricsSystemSupported(String name)
- Returns:
- true if this factory supports the named metrics system. Arbitrary strings are allowed. Constants are present for a few.
- See Also:
MICROMETER
,MP_METRICS
-
builder
default MetricsFactory.MetricBuilder builder(String name)
- Parameters:
name
- The name of the metric (required)- Returns:
- a fluid builder for registering metrics (default VENDOR type).
- See Also:
MetricsFactory.Type
-
builder
MetricsFactory.MetricBuilder builder(String name, MetricsFactory.Type type)
- Parameters:
name
- The name of the metric (required)type
- The scope or type of the metric (optional, may not be used)- Returns:
- a fluid builder for registering metrics.
- See Also:
MetricsFactory.Type
-
-