Class MeterRegistryFactory.Builder
- java.lang.Object
-
- io.helidon.integrations.micrometer.MeterRegistryFactory.Builder
-
- All Implemented Interfaces:
Builder<MeterRegistryFactory>
,Supplier<MeterRegistryFactory>
- Enclosing class:
- MeterRegistryFactory
public static class MeterRegistryFactory.Builder extends Object implements Builder<MeterRegistryFactory>
Builder for constructingMeterRegistryFactory
instances.
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MeterRegistryFactory
build()
Build the instance from this builder.MeterRegistryFactory.Builder
config(Config config)
Override default configuration.MeterRegistryFactory.Builder
enrollBuiltInRegistry(MeterRegistryFactory.BuiltInRegistryType builtInRegistryType)
Enrolls a built-in registry type using the default configuration for that type.MeterRegistryFactory.Builder
enrollBuiltInRegistry(MeterRegistryFactory.BuiltInRegistryType builtInRegistryType, io.micrometer.core.instrument.config.MeterRegistryConfig meterRegistryConfig)
Enrolls a built-in registry type to support.MeterRegistryFactory.Builder
enrollRegistry(io.micrometer.core.instrument.MeterRegistry meterRegistry, Function<ServerRequest,Optional<Handler>> handlerFunction)
Records aMetricRegistry
to be managed byMicrometerSupport
, along with the function that returns anOptional
of aHandler
for processing a given request to the Micrometer endpoint.
-
-
-
Method Detail
-
build
public MeterRegistryFactory build()
Description copied from interface:Builder
Build the instance from this builder.- Specified by:
build
in interfaceBuilder<MeterRegistryFactory>
- Returns:
- instance of the built type
-
config
public MeterRegistryFactory.Builder config(Config config)
Override default configuration.The config items supported vary from one built-in type to the next. See the documentation for the corresponding
MicrometerRegistryConfig
for details.- Parameters:
config
- configuration instance- Returns:
- updated builder instance
-
enrollBuiltInRegistry
public MeterRegistryFactory.Builder enrollBuiltInRegistry(MeterRegistryFactory.BuiltInRegistryType builtInRegistryType, io.micrometer.core.instrument.config.MeterRegistryConfig meterRegistryConfig)
Enrolls a built-in registry type to support.- Parameters:
builtInRegistryType
- built-in meter registry type to supportmeterRegistryConfig
- appropriateMeterRegistryConfig
instance setting up the meter registry- Returns:
- updated builder instance
-
enrollBuiltInRegistry
public MeterRegistryFactory.Builder enrollBuiltInRegistry(MeterRegistryFactory.BuiltInRegistryType builtInRegistryType)
Enrolls a built-in registry type using the default configuration for that type.- Parameters:
builtInRegistryType
- built-in meter registry type to support- Returns:
- updated builder instance
-
enrollRegistry
public MeterRegistryFactory.Builder enrollRegistry(io.micrometer.core.instrument.MeterRegistry meterRegistry, Function<ServerRequest,Optional<Handler>> handlerFunction)
Records aMetricRegistry
to be managed byMicrometerSupport
, along with the function that returns anOptional
of aHandler
for processing a given request to the Micrometer endpoint.- Parameters:
meterRegistry
- the registry to enrollhandlerFunction
- returnsOptional<Handler>
; if present, capable of responding to the specified request- Returns:
- updated builder instance
-
-