Interface MetricDefinition.Builder

  • Method Details

    • filters

      The predicates selecting which events contribute to the metric. Combined with logical AND.

      Parameters:
      filters - The predicates selecting which events contribute to the metric. Combined with logical AND.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • filters

      The predicates selecting which events contribute to the metric. Combined with logical AND.

      Parameters:
      filters - The predicates selecting which events contribute to the metric. Combined with logical AND.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • filters

      The predicates selecting which events contribute to the metric. Combined with logical AND.

      This is a convenience method that creates an instance of the MetricFilter.Builder avoiding the need to create one manually via MetricFilter.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to filters(List<MetricFilter>).

      Parameters:
      filters - a consumer that will call methods on MetricFilter.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • function

      MetricDefinition.Builder function(String function)

      The aggregation function applied to matching events (SUM, COUNT, or MAX).

      Parameters:
      function - The aggregation function applied to matching events (SUM, COUNT, or MAX).
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • function

      The aggregation function applied to matching events (SUM, COUNT, or MAX).

      Parameters:
      function - The aggregation function applied to matching events (SUM, COUNT, or MAX).
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • functionField

      MetricDefinition.Builder functionField(String functionField)

      The event property key the aggregation function operates on. Required for SUM and MAX; ignored for COUNT.

      Parameters:
      functionField - The event property key the aggregation function operates on. Required for SUM and MAX; ignored for COUNT.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • groupBy

      The event fields to group aggregated results by.

      Parameters:
      groupBy - The event fields to group aggregated results by.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • groupBy

      MetricDefinition.Builder groupBy(String... groupBy)

      The event fields to group aggregated results by.

      Parameters:
      groupBy - The event fields to group aggregated results by.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • period

      The reset or rollup period for the aggregation.

      Parameters:
      period - The reset or rollup period for the aggregation.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • period

      The reset or rollup period for the aggregation.

      Parameters:
      period - The reset or rollup period for the aggregation.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also: