Top Description Methods
io.opentelemetry.api.metrics

public Interface MeterBuilder

Known Direct Implementers
io.opentelemetry.api.metrics.DefaultMeterProvider.NoopMeterBuilder

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 Summary

Modifier and TypeMethod and Description
public Meter

Returns:

a Meter instance configured with the provided options.
build
()

Gets or creates a Meter instance.

public MeterBuilder

Returns:

this
setInstrumentationVersion
(String
The instrumentation scope version.
instrumentationScopeVersion
)

Sets the instrumentation scope version of the resulting Meter.

public MeterBuilder

Returns:

this
setSchemaUrl
(String
The schema URL.
schemaUrl
)

Set the scope schema URL of the resulting Meter.

Method Detail

buildback to summary
public Meter build()

Gets or creates a Meter instance.

Returns:Meter

a Meter instance configured with the provided options.

setInstrumentationVersionback to summary
public MeterBuilder setInstrumentationVersion(String instrumentationScopeVersion)

Sets the instrumentation scope version of the resulting Meter. Version is part of Meter identity.

Parameters
instrumentationScopeVersion:String

The instrumentation scope version.

Returns:MeterBuilder

this

setSchemaUrlback to summary
public MeterBuilder setSchemaUrl(String schemaUrl)

Set the scope schema URL of the resulting Meter. Schema URL is part of Meter identity.

Parameters
schemaUrl:String

The schema URL.

Returns:MeterBuilder

this