Class MicrometerOptions.Builder

    • Method Detail

      • histogram

        public MicrometerOptions.Builder histogram​(boolean histogram)
        Enable histogram buckets used to generate aggregable percentile approximations in monitoring systems that have query facilities to do so.
        Parameters:
        histogram - true if histogram buckets are recorded
        Returns:
        this MicrometerOptions.Builder.
      • localDistinction

        public MicrometerOptions.Builder localDistinction​(boolean localDistinction)
        Enables per connection metrics tracking insead of per host/port. If true, multiple connections to the same host/connection point will be recorded separately which allows to inspect every connection individually. If false, multiple connections to the same host/connection point will be recorded together. This allows a consolidated view on one particular service. Defaults to false. See MicrometerOptions.DEFAULT_LOCAL_DISTINCTION. Warning: Enabling this could potentially cause a label cardinality explosion in the remote metric system and should be used with caution.
        Parameters:
        localDistinction - true if latencies are recorded distinct on local level (per connection)
        Returns:
        this MicrometerOptions.Builder.
      • enabledCommands

        public MicrometerOptions.Builder enabledCommands​(CommandType... commands)
        Sets which commands are enabled for latency recording. Defaults to an empty list, which means all commands will be recorded. Configuring enabled commands overwrites metricsFilter(Predicate).
        Parameters:
        commands - list of Redis commands that are enabled for latency recording, must not be null
        Returns:
        this MicrometerOptions.Builder.
        Since:
        6.3
      • maxLatency

        public MicrometerOptions.Builder maxLatency​(Duration maxLatency)
        Sets the maximum value that this timer is expected to observe. Sets an upper bound on histogram buckets that are shipped to monitoring systems that support aggregable percentile approximations. Only applicable when histogram is enabled. Defaults to 5m. See MicrometerOptions.DEFAULT_MAX_LATENCY.
        Parameters:
        maxLatency - the maximum value that this timer is expected to observe, must not be null
        Returns:
        this MicrometerOptions.Builder.
      • minLatency

        public MicrometerOptions.Builder minLatency​(Duration minLatency)
        Sets the minimum value that this timer is expected to observe. Sets a lower bound on histogram buckets that are shipped to monitoring systems that support aggregable percentile approximations. Only applicable when histogram is enabled. Defaults to 1ms. See MicrometerOptions.DEFAULT_MIN_LATENCY.
        Parameters:
        minLatency - the minimum value that this timer is expected to observe
        Returns:
        this MicrometerOptions.Builder.