Interface MetricsFactoryProvider
- All Known Implementing Classes:
MicrometerMetricsFactoryProvider
public interface MetricsFactoryProvider
Creates new instances of
MetricsFactory.-
Method Summary
Modifier and TypeMethodDescriptiondefault voidclose()Deprecated, for removal: This API element is subject to removal in a future version.since 27.0.0, for removal.create(Config rootConfig, MetricsConfig metricsConfig, Collection<MetersProvider> metersProviders) Creates a newMetricsFactoryfrom which the caller can obtainMeterRegistryandMeter.Builderinstances.default MetricsFactorycreate(Config rootConfig, MetricsConfig metricsConfig, Collection<MetersProvider> metersProviders, ServiceRegistry serviceRegistry) Creates a new metrics factory using services from the registry which owns the factory.
-
Method Details
-
create
MetricsFactory create(Config rootConfig, MetricsConfig metricsConfig, Collection<MetersProvider> metersProviders) Creates a newMetricsFactoryfrom which the caller can obtainMeterRegistryandMeter.Builderinstances.The
metricsConfigparameter will have been derived from therootConfig. In many cases the new factory will only need to know the metrics configuration so that object is provided as a convenience. The root config node allows the factory to use information from elsewhere in the config tree if needed.API Note: the default method implementation is provided for backward compatibility and will be removed in the next major version
- Parameters:
rootConfig- rootConfignodemetricsConfig-MetricsConfigsettingsmetersProviders- group ofMetersProviderwhich can furnishMeter.Builderinstances- Returns:
- new metrics factory
- Since:
- 4.4.0
-
create
default MetricsFactory create(Config rootConfig, MetricsConfig metricsConfig, Collection<MetersProvider> metersProviders, ServiceRegistry serviceRegistry) Creates a new metrics factory using services from the registry which owns the factory.- Parameters:
rootConfig- root config nodemetricsConfig- metrics settingsmetersProviders- providers of built-in metersserviceRegistry- service registry which owns the new factory- Returns:
- new metrics factory
-
close
Deprecated, for removal: This API element is subject to removal in a future version.since 27.0.0, for removal. Metrics factory lifecycle is managed by the service registry.No-op retained for compatibility. Service registries own and close the metrics factories they create.
-