Class MicrometerMetricsFactory

    • Constructor Detail

      • MicrometerMetricsFactory

        public MicrometerMetricsFactory()
      • MicrometerMetricsFactory

        public MicrometerMetricsFactory​(io.micrometer.core.instrument.MeterRegistry micrometerRegistry)
        Build a factory passing the Micrometer MeterRegistry to be used by Vert.x. This is useful in several scenarios, such as:
        • if there is already a MeterRegistry used in the application that should be used by Vert.x as well.
        • to define some backend configuration that is not covered in this module (example: reporting to non-covered backends such as New Relic)
        • to use Micrometer's CompositeRegistry
        This setter is mutually exclusive with setInfluxDbOptions/setPrometheusOptions/setJmxMetricsOptions and takes precedence over them.
        Parameters:
        micrometerRegistry - the registry to use
    • Method Detail

      • newOptions

        public MetricsOptions newOptions​(MetricsOptions options)
        Description copied from interface: VertxMetricsFactory
        Create metrics options from the provided options.

        Providers can override this method to provide a custom metrics options subclass that exposes custom configuration.

        It is used when a Vert.x instance is created with a MetricsOptions instance.

        Specified by:
        newOptions in interface VertxMetricsFactory
        Parameters:
        options - new metrics options
        Returns:
        new metrics options
      • newOptions

        public MetricsOptions newOptions()
        Description copied from interface: VertxMetricsFactory
        Create an empty metrics options. Providers can override this method to provide a custom metrics options subclass that exposes custom configuration.
        Specified by:
        newOptions in interface VertxMetricsFactory
        Returns:
        new metrics options
      • newOptions

        public MetricsOptions newOptions​(JsonObject jsonObject)
        Description copied from interface: VertxMetricsFactory
        Create metrics options from the provided jsonObject.

        Providers can override this method to provide a custom metrics options subclass that exposes custom configuration.

        Specified by:
        newOptions in interface VertxMetricsFactory
        Parameters:
        jsonObject - json provided by the user
        Returns:
        new metrics options