Skip to main content
A registry for creating named Meter instances.

Type Signature

trait MeterProvider[F[_]]

Methods

get

Creates a named Meter.
name
String
required
The name of the instrumentation scope, such as the instrumentation library, package, or fully qualified class name.
Returns: F[Meter[F]] Example:
val meterProvider: MeterProvider[IO] = ???
val meter: IO[Meter[IO]] = meterProvider.get("com.service.runtime")

meter

Creates a MeterBuilder for a named Meter instance.
name
String
required
The name of the instrumentation scope, such as the instrumentation library, package, or fully qualified class name.
Returns: MeterBuilder[F] Example:
val meterProvider: MeterProvider[IO] = ???
val meter: IO[Meter[IO]] = meterProvider
  .meter("com.service.runtime")
  .withVersion("1.0.0")
  .withSchemaUrl("https://opentelemetry.io/schema/v1.1.0")
  .get

Companion Object Methods

noop

Creates a no-op implementation of the MeterProvider. Type Signature:
def noop[F[_]: Applicative]: MeterProvider[F]
Returns: A no-op MeterProvider[F] where all operations are no-ops.

Build docs developers (and LLMs) love