Class InstrumentSelector.Builder
- java.lang.Object
-
- io.opentelemetry.sdk.metrics.view.InstrumentSelector.Builder
-
- Enclosing class:
- InstrumentSelector
public abstract static class InstrumentSelector.Builder extends Object
Builder forInstrumentSelectorinstances.
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract InstrumentSelectorbuild()Returns an InstrumentSelector instance with the content of this builder.InstrumentSelector.BuildersetInstrumentName(String instrumentName)Sets the exact instrument name that will be selected.abstract InstrumentSelector.BuildersetInstrumentNameFilter(Predicate<String> instrumentNameFilter)Sets thePatternfor instrument names that will be selected.InstrumentSelector.BuildersetInstrumentNamePattern(Pattern instrumentNamePattern)Sets thePatternfor instrument names that will be selected.InstrumentSelector.BuildersetInstrumentNameRegex(String regex)Sets a specifier for selecting Instruments by name.abstract InstrumentSelector.BuildersetInstrumentType(InstrumentType instrumentType)Sets a specifier forInstrumentType.abstract InstrumentSelector.BuildersetMeterSelector(MeterSelector meterSelector)Sets theMeterSelectorfor whichMeters will be included.
-
-
-
Method Detail
-
setInstrumentType
public abstract InstrumentSelector.Builder setInstrumentType(InstrumentType instrumentType)
Sets a specifier forInstrumentType.
-
setInstrumentNameFilter
public abstract InstrumentSelector.Builder setInstrumentNameFilter(Predicate<String> instrumentNameFilter)
Sets thePatternfor instrument names that will be selected.Note: The last provided of
setInstrumentNameFilter(java.util.function.Predicate<java.lang.String>),setInstrumentNamePattern(java.util.regex.Pattern)setInstrumentNameRegex(java.lang.String)andsetInstrumentName(java.lang.String)is used.
-
setInstrumentNamePattern
public final InstrumentSelector.Builder setInstrumentNamePattern(Pattern instrumentNamePattern)
Sets thePatternfor instrument names that will be selected.Note: The last provided of
setInstrumentNameFilter(java.util.function.Predicate<java.lang.String>),setInstrumentNamePattern(java.util.regex.Pattern)setInstrumentNameRegex(java.lang.String)andsetInstrumentName(java.lang.String)is used.
-
setInstrumentName
public final InstrumentSelector.Builder setInstrumentName(String instrumentName)
Sets the exact instrument name that will be selected.Note: The last provided of
setInstrumentNameFilter(java.util.function.Predicate<java.lang.String>),setInstrumentNamePattern(java.util.regex.Pattern)setInstrumentNameRegex(java.lang.String)andsetInstrumentName(java.lang.String)is used.
-
setInstrumentNameRegex
public final InstrumentSelector.Builder setInstrumentNameRegex(String regex)
Sets a specifier for selecting Instruments by name.Note: The last provided of
setInstrumentNameFilter(java.util.function.Predicate<java.lang.String>),setInstrumentNamePattern(java.util.regex.Pattern)setInstrumentNameRegex(java.lang.String)andsetInstrumentName(java.lang.String)is used.
-
setMeterSelector
public abstract InstrumentSelector.Builder setMeterSelector(MeterSelector meterSelector)
Sets theMeterSelectorfor whichMeters will be included.
-
build
public abstract InstrumentSelector build()
Returns an InstrumentSelector instance with the content of this builder.
-
-