GradientEdge CDK Utils
    Preparing search index...
    interface MetricFilterProps {
        applyOnTransformedLogs?: boolean;
        defaultValue?: number;
        dimensions?: Record<string, string>;
        filterName?: string;
        filterPattern: IFilterPattern;
        logGroup: ILogGroupRef;
        metricName: string;
        metricNamespace: string;
        metricValue?: string;
        options: MetricOptions;
        periodInSecs: number;
        unit?: Unit;
    }

    Hierarchy

    • MetricFilterProps
      • MetricFilterProps
    Index

    Properties

    applyOnTransformedLogs?: boolean

    Whether the metric filter is applied on the tranformed logs. This parameter is valid only for log groups that have an active log transformer. If this value is true, the metric filter is applied on the transformed version of the log events instead of the original ingested log events.

    - false
    
    defaultValue?: number

    The value to emit if the pattern does not match a particular event.

    No metric emitted.
    
    dimensions?: Record<string, string>

    The fields to use as dimensions for the metric. One metric filter can include as many as three dimensions.

    filterName?: string

    The name of the metric filter.

    - Cloudformation generated name.
    
    filterPattern: IFilterPattern

    Pattern to search for log events.

    logGroup: ILogGroupRef

    The log group to create the filter on.

    metricName: string

    The name of the metric to emit.

    metricNamespace: string

    The namespace of the metric to emit.

    metricValue?: string

    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'.

    "1"
    
    options: MetricOptions
    periodInSecs: number
    unit?: Unit

    The unit to assign to the metric.