Package io.opentelemetry.sdk.metrics
Class InstrumentSelectorBuilder
- java.lang.Object
-
- io.opentelemetry.sdk.metrics.InstrumentSelectorBuilder
-
public final class InstrumentSelectorBuilder extends java.lang.ObjectBuilder forInstrumentSelector.- Since:
- 1.14.0
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.StringinstrumentNameprivate InstrumentTypeinstrumentTypeprivate java.lang.StringinstrumentUnitprivate java.lang.StringmeterNameprivate java.lang.StringmeterSchemaUrlprivate java.lang.StringmeterVersion
-
Constructor Summary
Constructors Constructor Description InstrumentSelectorBuilder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description InstrumentSelectorbuild()Returns anInstrumentSelectorwith the configuration of this builder.InstrumentSelectorBuildersetMeterName(java.lang.String meterName)Select instruments associated with the givenmeterName.InstrumentSelectorBuildersetMeterSchemaUrl(java.lang.String meterSchemaUrl)Select instruments associated with the givenmeterSchemaUrl.InstrumentSelectorBuildersetMeterVersion(java.lang.String meterVersion)Select instruments associated with the givenmeterVersion.InstrumentSelectorBuildersetName(java.lang.String name)Select instruments with the givenname.InstrumentSelectorBuildersetType(InstrumentType instrumentType)Select instruments with the giveninstrumentType.InstrumentSelectorBuildersetUnit(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 anInstrumentSelectorwith the configuration of this builder.
-
-