Interface MeterBuilder


public interface MeterBuilder
Builder class for creating Meter instances.

Meters are identified by their scope name, version, and schema URL. These identifying fields, along with attributes, combine to form the instrumentation scope, which is attached to all metrics produced by the Meter.

Since:
1.10.0
  • Method Details

    • setSchemaUrl

      MeterBuilder setSchemaUrl(String schemaUrl)
      Set the scope schema URL of the resulting Meter. Schema URL is part of Meter identity.
      Parameters:
      schemaUrl - The schema URL.
      Returns:
      this
    • setInstrumentationVersion

      MeterBuilder setInstrumentationVersion(String instrumentationScopeVersion)
      Sets the instrumentation scope version of the resulting Meter. Version is part of Meter identity.
      Parameters:
      instrumentationScopeVersion - The instrumentation scope version.
      Returns:
      this
    • build

      Meter build()
      Gets or creates a Meter instance.
      Returns:
      a Meter instance configured with the provided options.