Class Info.Builder
- Enclosing class:
- Info
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
The_info
suffix will automatically be appended if it's missing.Throws anUnsupportedOperationException
because Info metrics cannot have a unit.Methods inherited from class MetricWithFixedMetadata.Builder
constLabels, help, labelNames
-
Method Details
-
name
The_info
suffix will automatically be appended if it's missing.
In the example above bothInfo info1 = Info.builder() .name("runtime_info") .build(); Info info2 = Info.builder() .name("runtime") .build();
info1
andinfo2
will be named"runtime_info"
in Prometheus.Throws an
IllegalArgumentException
ifMetricMetadata.isValidMetricName(name)
isfalse
.- Overrides:
name
in classMetricWithFixedMetadata.Builder<Info.Builder,
Info>
-
unit
Throws anUnsupportedOperationException
because Info metrics cannot have a unit.- Overrides:
unit
in classMetricWithFixedMetadata.Builder<Info.Builder,
Info>
-
build
- Specified by:
build
in classMetricWithFixedMetadata.Builder<Info.Builder,
Info>
-