Interface MetricsSupport

    • Method Detail

      • create

        static MetricsSupport create()
        Creates a new MetricsSupport instance using default metrics settings.
        Returns:
        new metrics support using default metrics settings
      • create

        static MetricsSupport create​(MetricsSettings metricsSettings,
                                     RestServiceSettings restServiceSettings)
        Creates a new MetricsSupport instance using the specified metrics settings and REST service settings.
        Parameters:
        metricsSettings - metrics settings to use in initializing the metrics support
        restServiceSettings - REST service settings for the metrics endpoint
        Returns:
        new metrics support using specified metrics and REST service settings
      • create

        static MetricsSupport create​(MetricsSettings metricsSettings)
        Creates a new MetricsSupport instance using the specified metrics settings and defaulted REST service settings.
        Parameters:
        metricsSettings - metrics settings to use in initializing the metrics support
        Returns:
        new metrics support using the specified metrics settings
      • create

        static MetricsSupport create​(Config config)
        Creates a new MetricsSupport instance using the specified configuration.
        Parameters:
        config - configuration to use
        Returns:
        new metrics support instance using the provided configuration
      • builder

        static MetricsSupport.Builder<?> builder()
        Returns a builder for the highest-priority MetricsSupport implementation.
        Returns:
        builder for MetricsSupport
      • prepareMetricsEndpoints

        void prepareMetricsEndpoints​(String endpointContext,
                                     Routing.Rules serviceEndpointRoutingRules)
        Prepares the family of /metrics endpoints.

        By default, requests to the metrics endpoints trigger a 404 response with an explanatory message that metrics are disabled. Implementations of this interface can provide more informative endpoints.

        Parameters:
        endpointContext - context (typically /metrics)
        serviceEndpointRoutingRules - routing rules to update with the disabled metrics endpoints
      • configureEndpoint

        void configureEndpoint​(Routing.Rules defaultRoutingRules,
                               Routing.Rules serviceEndpointRoutingRules)
        Prepares the endpoint which the service exposes.
        Specified by:
        configureEndpoint in interface RestServiceSupport
        Parameters:
        defaultRoutingRules - routing rules for the default routing
        serviceEndpointRoutingRules - routing rules (if different from default) for the service endpoint
      • configureVendorMetrics

        void configureVendorMetrics​(String routingName,
                                    Routing.Rules routingRules)
        Sets up vendor metrics routing using the specified routing name and routing builder.
        Parameters:
        routingName - routing name to use in setting up the vendor metrics
        routingRules - routing rules to modify