Package io.openlineage.client.metrics
Class MicrometerProvider
java.lang.Object
io.openlineage.client.metrics.MicrometerProvider
MicrometerProvider is a class that manages global OpenLineage meter registry implementation that
allows integrations to both add metrics backend from common OpenLineage config, or grab an
instance of an initialized MeterRegistry.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic io.micrometer.core.instrument.MeterRegistry
addMeterRegistry
(io.micrometer.core.instrument.MeterRegistry meterRegistry) Adds a MeterRegistry to the common OpenLineage meter registry.static io.micrometer.core.instrument.MeterRegistry
addMeterRegistryFromConfig
(Map<String, Object> config) Adds a MeterRegistry to the common OpenLineage meter registry based on the provided configuration.static io.micrometer.core.instrument.MeterRegistry
clear()
Clears the global OpenLineage meter registry and creates a new instance of a CompositeMeterRegistry.static io.micrometer.core.instrument.MeterRegistry
Returns the global OpenLineage meter registry.static Optional<io.micrometer.core.instrument.MeterRegistry>
parseMeterRegistryConfig
(Map<String, Object> config) Parses the configuration map to create an optional MeterRegistry.
-
Constructor Details
-
MicrometerProvider
public MicrometerProvider()
-
-
Method Details
-
parseMeterRegistryConfig
public static Optional<io.micrometer.core.instrument.MeterRegistry> parseMeterRegistryConfig(Map<String, Object> config) Parses the configuration map to create an optional MeterRegistry.- Parameters:
config
- The configuration map for the MeterRegistry.- Returns:
- Optional MeterRegistry created based on the configuration. Empty optional if the type is invalid or empty.
-
addMeterRegistryFromConfig
public static io.micrometer.core.instrument.MeterRegistry addMeterRegistryFromConfig(Map<String, Object> config) Adds a MeterRegistry to the common OpenLineage meter registry based on the provided configuration.- Parameters:
config
- The configuration for the MeterRegistry.- Returns:
- Common registry configured with the added MeterRegistry.
-
addMeterRegistry
public static io.micrometer.core.instrument.MeterRegistry addMeterRegistry(io.micrometer.core.instrument.MeterRegistry meterRegistry) Adds a MeterRegistry to the common OpenLineage meter registry.- Parameters:
meterRegistry
- The MeterRegistry to- Returns:
- MeterRegistry
-
getMeterRegistry
public static io.micrometer.core.instrument.MeterRegistry getMeterRegistry()Returns the global OpenLineage meter registry.- Returns:
- The global OpenLineage meter registry.
-
clear
public static io.micrometer.core.instrument.MeterRegistry clear()Clears the global OpenLineage meter registry and creates a new instance of a CompositeMeterRegistry.- Returns:
- The newly created CompositeMeterRegistry instance.
-