Interface MetricTransformation.Builder
- All Superinterfaces:
Buildable
,CopyableBuilder<MetricTransformation.Builder,
,MetricTransformation> SdkBuilder<MetricTransformation.Builder,
,MetricTransformation> SdkPojo
- Enclosing class:
MetricTransformation
-
Method Summary
Modifier and TypeMethodDescriptiondefaultValue
(Double defaultValue) (Optional) The value to emit when a filter pattern does not match a log event.dimensions
(Map<String, String> dimensions) The fields to use as dimensions for the metric.metricName
(String metricName) The name of the CloudWatch metric.metricNamespace
(String metricNamespace) A custom namespace to contain your metric in CloudWatch.metricValue
(String metricValue) The value to publish to the CloudWatch metric when a filter pattern matches a log event.The unit to assign to the metric.unit
(StandardUnit unit) The unit to assign to the metric.Methods inherited from interface software.amazon.awssdk.utils.builder.CopyableBuilder
copy
Methods inherited from interface software.amazon.awssdk.utils.builder.SdkBuilder
applyMutation, build
Methods inherited from interface software.amazon.awssdk.core.SdkPojo
equalsBySdkFields, sdkFields
-
Method Details
-
metricName
The name of the CloudWatch metric.
- Parameters:
metricName
- The name of the CloudWatch metric.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
metricNamespace
A custom namespace to contain your metric in CloudWatch. Use namespaces to group together metrics that are similar. For more information, see Namespaces.
- Parameters:
metricNamespace
- A custom namespace to contain your metric in CloudWatch. Use namespaces to group together metrics that are similar. For more information, see Namespaces.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
metricValue
The value to publish to the CloudWatch metric when a filter pattern matches a log event.
- Parameters:
metricValue
- The value to publish to the CloudWatch metric when a filter pattern matches a log event.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
defaultValue
(Optional) The value to emit when a filter pattern does not match a log event. This value can be null.
- Parameters:
defaultValue
- (Optional) The value to emit when a filter pattern does not match a log event. This value can be null.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
dimensions
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
orrequestID
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.
- Parameters:
dimensions
- 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
orrequestID
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.
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
unit
The unit to assign to the metric. If you omit this, the unit is set as
None
.- Parameters:
unit
- The unit to assign to the metric. If you omit this, the unit is set asNone
.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
unit
The unit to assign to the metric. If you omit this, the unit is set as
None
.- Parameters:
unit
- The unit to assign to the metric. If you omit this, the unit is set asNone
.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-