Enum MetricDefinition
- All Implemented Interfaces:
Serializable
,Comparable<MetricDefinition>
All tests should not use this enum directly, but should use MetricGetter
to access metric values. However, if
we add new metrics to the spec, their definitions should be added here. Having a defined list of all metrics allows
us to easily iterate through them for stuff like MetricGetter.baselineMetrics()
.
Each metric definition has a name, a type and a set of tags.
Each fault tolerance metric is assumed to have a method
tag, so the set of tags does not include a method
tag.
Each tag in the set is represented by an enum which implements MetricDefinition.TagValue
. Each enum has one entry for each
valid value for that tag.
For example, the metric ft.bulkhead.calls.total
has one tag, bulkheadResult
which can have the value
accepted
or rejected
. The value for this is BULKHEAD_CALLS
and calling
BULKHEAD_CALLS.getArgumentClasses()
returns MetricDefinition.BulkheadResult
, which is an enum with two entries,
MetricDefinition.BulkheadResult.ACCEPTED
and MetricDefinition.BulkheadResult.REJECTED
.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
static enum
static enum
static enum
static enum
static enum
static enum
static interface
static enum
-
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionClass<? extends org.eclipse.microprofile.metrics.Metric>
The subclass ofMetric
used by this metricgetName()
The metric nameClass<? extends MetricDefinition.TagValue>[]
The tags which are applied to this metricgetUnit()
The metric unitstatic MetricDefinition
Returns the enum constant of this type with the specified name.static MetricDefinition[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
INVOCATIONS
-
RETRY_CALLS
-
RETRY_RETRIES
-
TIMEOUT_CALLS
-
TIMEOUT_EXECUTION_DURATION
-
CIRCUITBREAKER_CALLS
-
CIRCUITBREAKER_STATE
-
CIRCUITBREAKER_OPENED
-
BULKHEAD_CALLS
-
BULKHEAD_EXECUTIONS_RUNNING
-
BULKHEAD_EXECUTIONS_WAITING
-
BULKHEAD_RUNNING_DURATION
-
BULKHEAD_WAITING_DURATION
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
getName
The metric name- Returns:
- the name
-
getUnit
The metric unit- Returns:
- the unit
-
getMetricClass
The subclass ofMetric
used by this metric- Returns:
- the metric class
-
getTagClasses
The tags which are applied to this metricThe classes returned from this method will be enums which implement
MetricDefinition.TagValue
- Returns:
- the tags which are applied to this metric
-