Class InstrumentSelector
java.lang.Object
io.opentelemetry.sdk.metrics.InstrumentSelector
- Direct Known Subclasses:
AutoValue_InstrumentSelector
Instrument selection criteria for applying
Views registered via SdkMeterProviderBuilder.registerView(InstrumentSelector, View).
Properties are ANDed together. For example, if getInstrumentName() is
"http.server.duration" and getMeterName() is "my.http.meter", then instruments are
selected where name is "http.server.duration" AND meter name is "my.http.meter".
- Since:
- 1.14.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic InstrumentSelectorBuilderbuilder()Returns a newInstrumentSelectorBuilderforInstrumentSelector.(package private) static InstrumentSelectorcreate(InstrumentType instrumentType, String instrumentName, String instrumentUnit, String meterName, String meterVersion, String meterSchemaUrl) abstract StringReturns the selected instrument name, or null if this selects all instrument names.abstract InstrumentTypeReturns the selectedInstrumentType, or null if this selects all instrument types.abstract StringReturns the selected instrument unit, or null if this selects all instrument units.abstract StringReturns the selected meter name, or null if this selects instruments from all meter names.abstract StringReturns the selected meter schema url, or null if this selects instruments from all meter schema urls.abstract StringReturns the selected meter version, or null if this selects instruments from all meter versions.final StringtoString()
-
Constructor Details
-
InstrumentSelector
InstrumentSelector()
-
-
Method Details
-
builder
Returns a newInstrumentSelectorBuilderforInstrumentSelector. -
create
-
getInstrumentType
Returns the selectedInstrumentType, or null if this selects all instrument types. -
getInstrumentName
Returns the selected instrument name, or null if this selects all instrument names.Instrument name may contain the wildcard characters
*and?with the following matching criteria:*matches 0 or more instances of any character?matches exactly one instance of any character
-
getInstrumentUnit
-
getMeterName
-
getMeterVersion
-
getMeterSchemaUrl
-
toString
-