Package io.opentelemetry.sdk.metrics
Class InstrumentSelector
java.lang.Object
io.opentelemetry.sdk.metrics.InstrumentSelector
Instrument selection criteria for applying
View
s 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 InstrumentSelectorBuilder
builder()
Returns a newInstrumentSelectorBuilder
forInstrumentSelector
.abstract String
Returns the selected instrument name, or null if this selects all instrument names.abstract InstrumentType
Returns the selectedInstrumentType
, or null if this selects all instrument types.abstract String
Returns the selected meter name, or null if this selects instruments from all meter names.abstract String
Returns the selected meter schema url, or null if this selects instruments from all meter schema urls.abstract String
Returns the selected meter version, or null if this selects instruments from all meter versions.final String
toString()
-
Method Details
-
builder
Returns a newInstrumentSelectorBuilder
forInstrumentSelector
. -
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
-
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
-