Class LogMetricFilterMetricTransformation


  • public final class LogMetricFilterMetricTransformation
    extends java.lang.Object
    • Method Detail

      • defaultValue

        public java.util.Optional<java.lang.String> defaultValue()
        Returns:
        The value to emit when a filter pattern does not match a log event. Conflicts with `dimensions`.
      • dimensions

        public java.util.Map<java.lang.String,​java.lang.String> dimensions()
        Returns:
        Map of fields to use as dimensions for the metric. Up to 3 dimensions are allowed. Conflicts with `defaultValue`.
      • name

        public java.lang.String name()
        Returns:
        The name of the CloudWatch metric to which the monitored log information should be published (e.g., `ErrorCount`)
      • namespace

        public java.lang.String namespace()
        Returns:
        The destination namespace of the CloudWatch metric.
      • unit

        public java.util.Optional<java.lang.String> unit()
        Returns:
        The unit to assign to the metric. If you omit this, the unit is set as `None`.
      • value

        public java.lang.String value()
        Returns:
        What to publish to the metric. For example, if you're counting the occurrences of a particular term like "Error", the value will be "1" for each occurrence. If you're counting the bytes transferred the published value will be the value in the log event.