Module io.prometheus.metrics.model
Class MetricNameFilter.Builder
java.lang.Object
io.prometheus.metrics.model.registry.MetricNameFilter.Builder
- Enclosing class:
- MetricNameFilter
-
Method Summary
Modifier and TypeMethodDescriptionbuild()nameMustBeEqualTo(String... names) nameMustBeEqualTo(Collection<String> names) Only samples with one of thenameswill be included.nameMustNotBeEqualTo(String... names) nameMustNotBeEqualTo(Collection<String> names) All samples that are not innameswill be excluded.nameMustNotStartWith(String... prefixes) nameMustNotStartWith(Collection<String> prefixes) Samples with names starting with one of theprefixeswill be excluded.nameMustStartWith(String... prefixes) nameMustStartWith(Collection<String> prefixes) Only samples whose name starts with one of theprefixeswill be included.
-
Method Details
-
nameMustBeEqualTo
- See Also:
-
nameMustBeEqualTo
Only samples with one of thenameswill be included.Note that the provided
nameswill be matched against the sample name (i.e. the time series name) and not the metric name. For instance, to retrieve all samples from a histogram, you must include the '_count', '_sum' and '_bucket' names.This method should be used by HTTP exporters to implement the
?name[]=URL parameters.- Parameters:
names- empty means no restriction.
-
nameMustNotBeEqualTo
- See Also:
-
nameMustNotBeEqualTo
All samples that are not innameswill be excluded.Note that the provided
nameswill be matched against the sample name (i.e. the time series name) and not the metric name. For instance, to exclude all samples from a histogram, you must exclude the '_count', '_sum' and '_bucket' names.- Parameters:
names- empty means no name will be excluded.
-
nameMustStartWith
- See Also:
-
nameMustStartWith
Only samples whose name starts with one of theprefixeswill be included.- Parameters:
prefixes- empty means no restriction.
-
nameMustNotStartWith
- See Also:
-
nameMustNotStartWith
Samples with names starting with one of theprefixeswill be excluded.- Parameters:
prefixes- empty means no time series will be excluded.
-
build
-