Class Counter.Builder
Object
MetricWithFixedMetadata.Builder<B,M>
Builder
- Enclosing class:
- Counter
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Override if there are more properties than just exemplars enabled.The_total
suffix will automatically be appended if it's missing.Allow Exemplars for this metric.Turn off Exemplars for this metric.Methods inherited from class MetricWithFixedMetadata.Builder
constLabels, help, labelNames, unit
-
Method Details
-
name
The_total
suffix will automatically be appended if it's missing.
In the example above bothCounter c1 = Counter.builder() .name("events_total") .build(); Counter c2 = Counter.builder() .name("events") .build();
c1
andc2
would be named"events_total"
in Prometheus.Throws an
IllegalArgumentException
ifMetricMetadata.isValidMetricName(name)
isfalse
.- Overrides:
name
in classMetricWithFixedMetadata.Builder<Counter.Builder,
Counter>
-
build
- Specified by:
build
in classMetricWithFixedMetadata.Builder<Counter.Builder,
Counter>
-
withExemplars
Allow Exemplars for this metric. -
withoutExemplars
Turn off Exemplars for this metric. -
getDefaultProperties
Override if there are more properties than just exemplars enabled.
-