Package io.opentelemetry.sdk.metrics
Class InstrumentSelector
java.lang.Object
io.opentelemetry.sdk.metrics.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
-
Method Summary
Modifier and TypeMethodDescriptionstatic InstrumentSelectorBuilderbuilder()Returns a newInstrumentSelectorBuilderforInstrumentSelector.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()
-
Method Details
-
builder
Returns a newInstrumentSelectorBuilderforInstrumentSelector. -
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
Returns the selected instrument unit, or null if this selects all instrument units.- Since:
- 1.24.0
-
getMeterName
Returns the selected meter name, or null if this selects instruments from all meter names. -
getMeterVersion
Returns the selected meter version, or null if this selects instruments from all meter versions. -
getMeterSchemaUrl
Returns the selected meter schema url, or null if this selects instruments from all meter schema urls. -
toString
-