Interface ModulithEventMetrics

All Known Implementing Classes:
CrossModuleEventCounterFactory

public interface ModulithEventMetrics
SPI to customize the Counter instances created for cross-module application events.
Since:
1.4
Author:
Oliver Drotbohm, Marcin Grzejszczak
  • Method Summary

    Modifier and Type
    Method
    Description
    customize(Class<T> type, BiConsumer<T,io.micrometer.core.instrument.Counter.Builder> consumer)
    Customizes a Counter.Builder to eventually produce a Counter for the event of the given type.
    customize(Class<T> type, Function<T,io.micrometer.core.instrument.Counter.Builder> factory)
    Customizes the creation of a Counter.Builder for events of the given type.
  • Method Details

    • customize

      <T> ModulithEventMetrics customize(Class<T> type, BiConsumer<T,io.micrometer.core.instrument.Counter.Builder> consumer)
      Customizes a Counter.Builder to eventually produce a Counter for the event of the given type. The Counter.Builder will have been set up named after the fully-qualified type name. To customize the creation, also call customize(Class, Function).
      Type Parameters:
      T - the type of the event.
      Parameters:
      type - must not be null.
      consumer - must not be null.
      Returns:
      will never be null.
      See Also:
    • customize

      <T> ModulithEventMetrics customize(Class<T> type, Function<T,io.micrometer.core.instrument.Counter.Builder> factory)
      Customizes the creation of a Counter.Builder for events of the given type. The instances created will still be subject to customizations registered via customize(Class, BiConsumer).
      Type Parameters:
      T -
      Parameters:
      type - must not be null.
      factory - must not be null.
      Returns:
      will never be null.