Package io.opentelemetry.sdk.metrics
Class ViewBuilder
java.lang.Object
io.opentelemetry.sdk.metrics.ViewBuilder
A builder for
View
.- Since:
- 1.14.0
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Returns aView
with the configuration of this builder.setAggregation
(Aggregation aggregation) SetsAggregation
.setAttributeFilter
(Predicate<String> keyFilter) Sets a filter for attributes keys.setDescription
(String description) Sets the description of the resulting metric.Sets the name of the resulting metric.
-
Method Details
-
setName
Sets the name of the resulting metric.- Parameters:
name
- metric name ornull
if the matched instrument name should be used.
-
setDescription
Sets the description of the resulting metric.- Parameters:
description
- metric description ornull
if the matched instrument description should be used.
-
setAggregation
SetsAggregation
.- Parameters:
aggregation
- aggregation to use.
-
setAttributeFilter
Sets a filter for attributes keys.Only attribute keys that pass the supplied
Predicate
will be included in the output.- Parameters:
keyFilter
- filter for attribute keys to include.
-
build
Returns aView
with the configuration of this builder.
-