Interface MeterBuilder


public interface MeterBuilder
Builder class for creating Meter instances.
Since:
1.4.0
  • Method Details

    • setSchemaUrl

      MeterBuilder setSchemaUrl(String schemaUrl)
      Assigns an OpenTelemetry schema URL to the resulting Meter.

      Schemas are used to identify expected metrics (semantic conventions) and allow backends to "automatically migrate" to supported versions.

      Parameters:
      schemaUrl - The URL of the OpenTelemetry schema being used by this instrumentation scope.
      Returns:
      this
    • setInstrumentationVersion

      MeterBuilder setInstrumentationVersion(String instrumentationScopeVersion)
      Assigns a version to the instrumentation scope that is using the resulting Meter.
      Parameters:
      instrumentationScopeVersion - The version of the instrumentation scope.
      Returns:
      this
    • build

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