Package io.helidon.metrics
Class MetricsSupport.Builder
- java.lang.Object
-
- io.helidon.metrics.MetricsSupport.Builder
-
- All Implemented Interfaces:
Builder<MetricsSupport>
,Supplier<MetricsSupport>
- Enclosing class:
- MetricsSupport
public static final class MetricsSupport.Builder extends Object implements Builder<MetricsSupport>
A fluent API builder to build instances ofMetricsSupport
.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description MetricsSupport
build()
Build the instance from this builder.MetricsSupport.Builder
config(Config config)
Override default configuration.MetricsSupport.Builder
context(String newContext)
Deprecated.usewebContext(String)
instead, aligned with API of heatlh checksMetricsSupport.Builder
registryFactory(RegistryFactory factory)
If you want to have mutliple registry factories with different endpoints, you may create them usingRegistryFactory.create(io.helidon.config.Config)
orRegistryFactory.create()
and create multipleMetricsSupport
instances with differentcontexts
.MetricsSupport.Builder
webContext(String path)
Set a new root context for REST API of metrics.
-
-
-
Method Detail
-
build
public MetricsSupport build()
Description copied from interface:Builder
Build the instance from this builder.- Specified by:
build
in interfaceBuilder<MetricsSupport>
- Returns:
- instance of the built type
-
config
public MetricsSupport.Builder config(Config config)
Override default configuration.- Parameters:
config
- configuration instance- Returns:
- updated builder instance
- See Also:
for details about configuration keys
-
registryFactory
public MetricsSupport.Builder registryFactory(RegistryFactory factory)
If you want to have mutliple registry factories with different endpoints, you may create them usingRegistryFactory.create(io.helidon.config.Config)
orRegistryFactory.create()
and create multipleMetricsSupport
instances with differentcontexts
.If this method is not called,
MetricsSupport
would use the shared instance as provided byRegistryFactory.getInstance(io.helidon.config.Config)
- Parameters:
factory
- factory to use in this metric support- Returns:
- updated builder instance
-
context
@Deprecated public MetricsSupport.Builder context(String newContext)
Deprecated.usewebContext(String)
instead, aligned with API of heatlh checksSet a new root context for REST API of metrics.- Parameters:
newContext
- context to use- Returns:
- updated builder instance
-
webContext
public MetricsSupport.Builder webContext(String path)
Set a new root context for REST API of metrics.- Parameters:
path
- context to use- Returns:
- updated builder instance
-
-