Interface MetricFilterOptions

All Superinterfaces:
All Known Subinterfaces:
All Known Implementing Classes:
MetricFilterOptions.Jsii$Proxy, MetricFilterProps.Jsii$Proxy

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:30:38.128Z") @Stability(Stable) public interface MetricFilterOptions extends
Properties for a MetricFilter created from a LogGroup.


 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 IFilterPattern filterPattern;
 MetricFilterOptions metricFilterOptions = MetricFilterOptions.builder()
         // the properties below are optional
  • Method Details

    • getFilterPattern

      @Stability(Stable) @NotNull IFilterPattern getFilterPattern()
      Pattern to search for log events.
    • getMetricName

      @Stability(Stable) @NotNull String getMetricName()
      The name of the metric to emit.
    • getMetricNamespace

      @Stability(Stable) @NotNull String getMetricNamespace()
      The namespace of the metric to emit.
    • getDefaultValue

      @Stability(Stable) @Nullable default Number getDefaultValue()
      The value to emit if the pattern does not match a particular event.

      Default: No metric emitted.

    • getMetricValue

      @Stability(Stable) @Nullable default String getMetricValue()
      The value to emit for the metric.

      Can either be a literal number (typically "1"), or the name of a field in the structure to take the value from the matched event. If you are using a field value, the field value must have been matched using the pattern.

      If you want to specify a field from a matched JSON structure, use '$.fieldName', and make sure the field is in the pattern (if only as '$.fieldName = *').

      If you want to specify a field from a matched space-delimited structure, use '$fieldName'.

      Default: "1"

    • builder

      @Stability(Stable) static MetricFilterOptions.Builder builder()
      a MetricFilterOptions.Builder of MetricFilterOptions