Class InstrumentSelector
- java.lang.Object
-
- io.opentelemetry.sdk.metrics.view.InstrumentSelector
-
@Immutable public abstract class InstrumentSelector extends java.lang.ObjectProvides means for selecting one ore moreInstruments. Used for configuring aggregations for the specified instruments.There are two options for selecting instruments: by instrument name and by instrument type.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceInstrumentSelector.BuilderBuilder forInstrumentSelectorinstances.
-
Constructor Summary
Constructors Constructor Description InstrumentSelector()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description booleanhasInstrumentNameRegex()Returns whether the instrument name regex been specified.booleanhasInstrumentType()Returns whether the InstrumentType been specified.java.util.regex.PatterninstrumentNamePattern()Returns thePatterngenerated by the providedinstrumentNameRegex(), or null if none was specified.abstract java.lang.StringinstrumentNameRegex()Returns which instrument names should be selected.abstract InstrumentTypeinstrumentType()ReturnsInstrumentTypethat should be selected.static InstrumentSelector.BuildernewBuilder()
-
-
-
Method Detail
-
newBuilder
public static InstrumentSelector.Builder newBuilder()
-
instrumentType
@Nullable public abstract InstrumentType instrumentType()
ReturnsInstrumentTypethat should be selected. If null, then this specifier will not be used.
-
instrumentNameRegex
@Nullable public abstract java.lang.String instrumentNameRegex()
Returns which instrument names should be selected. This is a regex. If null, then this specifier will not be used.
-
instrumentNamePattern
@Nullable @Memoized public java.util.regex.Pattern instrumentNamePattern()
Returns thePatterngenerated by the providedinstrumentNameRegex(), or null if none was specified.
-
hasInstrumentType
public boolean hasInstrumentType()
Returns whether the InstrumentType been specified.
-
hasInstrumentNameRegex
public boolean hasInstrumentNameRegex()
Returns whether the instrument name regex been specified.
-
-