Class InstrumentSelectorBuilder

java.lang.Object
io.opentelemetry.sdk.metrics.InstrumentSelectorBuilder

public final class InstrumentSelectorBuilder extends Object
Builder for InstrumentSelector.
  • Method Details

    • setType

      public InstrumentSelectorBuilder setType(InstrumentType instrumentType)
      Sets a specifier for InstrumentType.
    • setName

      public InstrumentSelectorBuilder setName(String name)
      Sets the exact instrument name that will be selected.

      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
    • setMeterName

      public InstrumentSelectorBuilder setMeterName(String meterName)
      Sets a specifier for selecting instruments by the name of their associated Meter.
    • setMeterVersion

      public InstrumentSelectorBuilder setMeterVersion(String meterVersion)
      Sets a specifier for selecting instruments by the version of their associated Meter.
    • setMeterSchemaUrl

      public InstrumentSelectorBuilder setMeterSchemaUrl(String meterSchemaUrl)
      Sets a specifier for selecting instruments by the schema URL of their associated Meter.
    • build

      public InstrumentSelector build()
      Returns an InstrumentSelector instance with the content of this builder.