Class ThresholdLogReporter.Builder

java.lang.Object
com.couchbase.client.core.tracing.ThresholdLogReporter.Builder
Enclosing class:
ThresholdLogReporter

public static class ThresholdLogReporter.Builder
extends Object
The builder used to configure the ThresholdLogReporter.
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • build

      public ThresholdLogReporter build()
    • logInterval

      public ThresholdLogReporter.Builder logInterval​(long interval, TimeUnit unit)
      Allows to customize the log interval. if set to 0, disables it.
      Parameters:
      interval - the interval to use.
      unit - the time unit for the interval.
      Returns:
      this builder for chaining.
    • spanQueueSize

      public ThresholdLogReporter.Builder spanQueueSize​(int spanQueueSize)
      Allows to configure the queue size for the individual span queues used to track the spans over threshold.
      Parameters:
      spanQueueSize - the queue size to use.
      Returns:
      this builder for chaining.
    • kvThreshold

      public ThresholdLogReporter.Builder kvThreshold​(long kvThreshold, TimeUnit timeUnit)
      Allows to customize the kvThreshold.
      Parameters:
      kvThreshold - the threshold to set.
      Returns:
      this builder for chaining.
    • n1qlThreshold

      public ThresholdLogReporter.Builder n1qlThreshold​(long n1qlThreshold, TimeUnit timeUnit)
      Allows to customize the n1qlThreshold.
      Parameters:
      n1qlThreshold - the threshold to set.
      Returns:
      this builder for chaining.
    • viewThreshold

      public ThresholdLogReporter.Builder viewThreshold​(long viewThreshold, TimeUnit timeUnit)
      Allows to customize the viewThreshold.
      Parameters:
      viewThreshold - the threshold to set.
      Returns:
      this builder for chaining.
    • ftsThreshold

      public ThresholdLogReporter.Builder ftsThreshold​(long ftsThreshold, TimeUnit timeUnit)
      Allows to customize the ftsThreshold.
      Parameters:
      ftsThreshold - the threshold to set.
      Returns:
      this builder for chaining.
    • analyticsThreshold

      public ThresholdLogReporter.Builder analyticsThreshold​(long analyticsThreshold, TimeUnit timeUnit)
      Allows to customize the analyticsThreshold.
      Parameters:
      analyticsThreshold - the threshold to set.
      Returns:
      this builder for chaining.
    • sampleSize

      public ThresholdLogReporter.Builder sampleSize​(int sampleSize)
      Allows to customize the sample size per service.
      Parameters:
      sampleSize - the sample size to set.
      Returns:
      this builder for chaining.
    • pretty

      public ThresholdLogReporter.Builder pretty​(boolean pretty)
      Allows to set the JSON output to pretty, making it more readable but also more verbose. Helpful during debugging.
      Parameters:
      pretty - set to true, false by default
      Returns:
      this builder for chaining.