Class MicrometerProvider

java.lang.Object
io.openlineage.client.metrics.MicrometerProvider

public class MicrometerProvider extends Object
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

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static 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
    Adds a MeterRegistry to the common OpenLineage meter registry based on the provided configuration.
    static io.micrometer.core.instrument.MeterRegistry
    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>
    Parses the configuration map to create an optional MeterRegistry.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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.