Package io.opentelemetry.sdk.metrics
Class InstrumentSelectorBuilder
- java.lang.Object
-
- io.opentelemetry.sdk.metrics.InstrumentSelectorBuilder
-
public final class InstrumentSelectorBuilder extends java.lang.Object
Builder forInstrumentSelector
.- Since:
- 1.14.0
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String
instrumentName
private InstrumentType
instrumentType
private java.lang.String
instrumentUnit
private java.lang.String
meterName
private java.lang.String
meterSchemaUrl
private java.lang.String
meterVersion
-
Constructor Summary
Constructors Constructor Description InstrumentSelectorBuilder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description InstrumentSelector
build()
Returns anInstrumentSelector
with the configuration of this builder.InstrumentSelectorBuilder
setMeterName(java.lang.String meterName)
Select instruments associated with the givenmeterName
.InstrumentSelectorBuilder
setMeterSchemaUrl(java.lang.String meterSchemaUrl)
Select instruments associated with the givenmeterSchemaUrl
.InstrumentSelectorBuilder
setMeterVersion(java.lang.String meterVersion)
Select instruments associated with the givenmeterVersion
.InstrumentSelectorBuilder
setName(java.lang.String name)
Select instruments with the givenname
.InstrumentSelectorBuilder
setType(InstrumentType instrumentType)
Select instruments with the giveninstrumentType
.InstrumentSelectorBuilder
setUnit(java.lang.String unit)
Select instruments with the givenunit
.
-
-
-
Field Detail
-
instrumentType
@Nullable private InstrumentType instrumentType
-
instrumentName
@Nullable private java.lang.String instrumentName
-
instrumentUnit
@Nullable private java.lang.String instrumentUnit
-
meterName
@Nullable private java.lang.String meterName
-
meterVersion
@Nullable private java.lang.String meterVersion
-
meterSchemaUrl
@Nullable private java.lang.String meterSchemaUrl
-
-
Method Detail
-
setType
public InstrumentSelectorBuilder setType(InstrumentType instrumentType)
Select instruments with the giveninstrumentType
.
-
setName
public InstrumentSelectorBuilder setName(java.lang.String name)
Select instruments with the givenname
.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
-
setUnit
public InstrumentSelectorBuilder setUnit(java.lang.String unit)
Select instruments with the givenunit
.- Since:
- 1.24.0
-
setMeterName
public InstrumentSelectorBuilder setMeterName(java.lang.String meterName)
Select instruments associated with the givenmeterName
.
-
setMeterVersion
public InstrumentSelectorBuilder setMeterVersion(java.lang.String meterVersion)
Select instruments associated with the givenmeterVersion
.
-
setMeterSchemaUrl
public InstrumentSelectorBuilder setMeterSchemaUrl(java.lang.String meterSchemaUrl)
Select instruments associated with the givenmeterSchemaUrl
.
-
build
public InstrumentSelector build()
Returns anInstrumentSelector
with the configuration of this builder.
-
-