Class DistributionStatisticConfig.Builder

    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • percentiles

        public DistributionStatisticConfig.Builder percentiles​(@Nullable
                                                               double... percentiles)
        Produces an additional time series for each requested percentile. This percentile is computed locally, and so can't be aggregated with percentiles computed across other dimensions (e.g. in a different instance). Use DistributionStatisticConfig.percentileHistogram to publish a histogram that can be used to generate aggregable percentile approximations.
        Parameters:
        percentiles - Percentiles to compute and publish. The 95th percentile should be expressed as 0.95.
        Returns:
        This builder.
      • percentilePrecision

        public DistributionStatisticConfig.Builder percentilePrecision​(@Nullable
                                                                       java.lang.Integer digitsOfPrecision)
        Determines the number of digits of precision to maintain on the dynamic range histogram used to compute percentile approximations. The higher the degrees of precision, the more accurate the approximation is at the cost of more memory.
        Parameters:
        digitsOfPrecision - The digits of precision to maintain for percentile approximations.
        Returns:
        This builder.
      • minimumExpectedValue

        public DistributionStatisticConfig.Builder minimumExpectedValue​(@Nullable
                                                                        java.lang.Long min)
        The minimum value that the meter is expected to observe. Sets a lower bound on histogram buckets that are shipped to monitoring systems that support aggregable percentile approximations.
        Parameters:
        min - The minimum value that this distribution summary is expected to observe.
        Returns:
        This builder.
      • maximumExpectedValue

        public DistributionStatisticConfig.Builder maximumExpectedValue​(@Nullable
                                                                        java.lang.Long max)
        The maximum value that the meter is expected to observe. Sets an upper bound on histogram buckets that are shipped to monitoring systems that support aggregable percentile approximations.
        Parameters:
        max - The maximum value that the meter is expected to observe.
        Returns:
        This builder.
      • expiry

        public DistributionStatisticConfig.Builder expiry​(@Nullable
                                                          java.time.Duration expiry)
        Statistics like max, percentiles, and histogram counts decay over time to give greater weight to recent samples (exception: histogram counts are cumulative for those systems that expect cumulative histogram buckets). Samples are accumulated to such statistics in ring buffers which rotate after this expiry, with a buffer length of bufferLength(java.lang.Integer).
        Parameters:
        expiry - The amount of time samples are accumulated to decaying distribution statistics before they are reset and rotated.
        Returns:
        This builder.
      • bufferLength

        public DistributionStatisticConfig.Builder bufferLength​(@Nullable
                                                                java.lang.Integer bufferLength)
        Statistics like max, percentiles, and histogram counts decay over time to give greater weight to recent samples (exception: histogram counts are cumulative for those systems that expect cumulative histogram buckets). Samples are accumulated to such statistics in ring buffers which rotate after expiry(java.time.Duration), with this buffer length.
        Parameters:
        bufferLength - The number of histograms to keep in the ring buffer.
        Returns:
        This builder.