Interface MetricsObserverConfig
- All Superinterfaces:
ObserverConfigBase
,Prototype.Api
,Prototype.Factory<MetricsObserver>
- All Known Implementing Classes:
MetricsObserverConfig.BuilderBase.MetricsObserverConfigImpl
Metrics Observer configuration.
- See Also:
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic class
Fluent API builder forMetricsObserver
.static class
MetricsObserverConfig.BuilderBase<BUILDER extends MetricsObserverConfig.BuilderBase<BUILDER,
PROTOTYPE>, PROTOTYPE extends MetricsObserverConfig> Fluent API builder base forMetricsObserver
. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
Create a new fluent API builder to customize configuration.builder
(MetricsObserverConfig instance) Create a new fluent API builder from an existing instance.static MetricsObserverConfig
create()
Create a new instance with default values.static MetricsObserverConfig
Create a new instance from configuration.boolean
enabled()
Whether this observer is enabled.endpoint()
If you want to have multiple meter registries with different endpoints, you may create them usingMeterRegistry meterRegistry = MetricsFactory.getInstance() .createMeterRegistry(metricsConfig); MetricsFeature.builder() .meterRegistry(meterRegistry) // further settings on the feature builder, etc.
metricsConfig
in each case has differentsettings
.AssignsMetricsSettings
which will be used in creating theMetricsSupport
instance at build-time.name()
Methods inherited from interface io.helidon.builder.api.Prototype.Factory
build
-
Method Details
-
builder
Create a new fluent API builder to customize configuration.- Returns:
- a new builder
-
builder
Create a new fluent API builder from an existing instance.- Parameters:
instance
- an existing instance used as a base for the builder- Returns:
- a builder based on an instance
-
create
Create a new instance from configuration.- Parameters:
config
- used to configure the new instance- Returns:
- a new instance configured from configuration
-
create
Create a new instance with default values.- Returns:
- a new instance
-
endpoint
String endpoint() -
name
String name() -
metricsConfig
MetricsConfig metricsConfig()AssignsMetricsSettings
which will be used in creating theMetricsSupport
instance at build-time.- Returns:
- the metrics settings to assign for use in building the
MetricsSupport
instance
-
meterRegistry
Optional<MeterRegistry> meterRegistry()If you want to have multiple meter registries with different endpoints, you may create them usingMeterRegistry meterRegistry = MetricsFactory.getInstance() .createMeterRegistry(metricsConfig); MetricsFeature.builder() .meterRegistry(meterRegistry) // further settings on the feature builder, etc.
metricsConfig
in each case has differentsettings
.If this method is not called,
MetricsFeature
would use the shared instance as provided byMetricsFactory.globalRegistry()
.- Returns:
- meterRegistry to use in this metric support
-
enabled
boolean enabled()Whether this observer is enabled.- Returns:
false
to disable observer
-