AWSLogsMetricTransformation

Objective-C

@interface AWSLogsMetricTransformation

Swift

class AWSLogsMetricTransformation

Indicates how to transform ingested log events to metric data in a CloudWatch metric.

Required parameters: [metricName, metricNamespace, metricValue]

  • (Optional) The value to emit when a filter pattern does not match a log event. This value can be null.

    Declaration

    Objective-C

    @property (nonatomic, strong) NSNumber *_Nullable defaultValue;

    Swift

    var defaultValue: NSNumber? { get set }
  • The fields to use as dimensions for the metric. One metric filter can include as many as three dimensions.

    Metrics extracted from log events are charged as custom metrics. To prevent unexpected high charges, do not specify high-cardinality fields such as IPAddress or requestID as dimensions. Each different value found for a dimension is treated as a separate metric and accrues charges as a separate custom metric.

    CloudWatch Logs disables a metric filter if it generates 1000 different name/value pairs for your specified dimensions within a certain amount of time. This helps to prevent accidental high charges.

    You can also set up a billing alarm to alert you if your charges are higher than expected. For more information, see Creating a Billing Alarm to Monitor Your Estimated Amazon Web Services Charges.

    Declaration

    Objective-C

    @property (nonatomic, strong) NSDictionary<NSString *, NSString *> *_Nullable dimensions;

    Swift

    var dimensions: [String : String]? { get set }
  • The name of the CloudWatch metric.

    Declaration

    Objective-C

    @property (nonatomic, strong) NSString *_Nullable metricName;

    Swift

    var metricName: String? { get set }
  • A custom namespace to contain your metric in CloudWatch. Use namespaces to group together metrics that are similar. For more information, see Namespaces.

    Declaration

    Objective-C

    @property (nonatomic, strong) NSString *_Nullable metricNamespace;

    Swift

    var metricNamespace: String? { get set }
  • The value to publish to the CloudWatch metric when a filter pattern matches a log event.

    Declaration

    Objective-C

    @property (nonatomic, strong) NSString *_Nullable metricValue;

    Swift

    var metricValue: String? { get set }
  • The unit to assign to the metric. If you omit this, the unit is set as None.

    Declaration

    Objective-C

    @property (nonatomic) AWSLogsStandardUnit unit;

    Swift

    var unit: AWSLogsStandardUnit { get set }