Struct aws_sdk_cloudwatchlogs::model::MetricTransformation [−][src]
#[non_exhaustive]pub struct MetricTransformation {
pub metric_name: Option<String>,
pub metric_namespace: Option<String>,
pub metric_value: Option<String>,
pub default_value: Option<f64>,
pub dimensions: Option<HashMap<String, String>>,
pub unit: Option<StandardUnit>,
}
Expand description
Indicates how to transform ingested log events to metric data in a CloudWatch metric.
Fields (Non-exhaustive)
This struct is marked as non-exhaustive
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.metric_name: Option<String>
The name of the CloudWatch metric.
metric_namespace: Option<String>
A custom namespace to contain your metric in CloudWatch. Use namespaces to group together metrics that are similar. For more information, see Namespaces.
metric_value: Option<String>
The value to publish to the CloudWatch metric when a filter pattern matches a log event.
default_value: Option<f64>
(Optional) The value to emit when a filter pattern does not match a log event. This value can be null.
dimensions: Option<HashMap<String, String>>
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.
To help prevent accidental high charges, Amazon disables a metric filter if it generates 1000 different name/value pairs for the dimensions that you have specified within a certain amount of time.
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.
unit: Option<StandardUnit>
The unit to assign to the metric. If you omit this, the unit is set as None
.
Implementations
The name of the CloudWatch metric.
A custom namespace to contain your metric in CloudWatch. Use namespaces to group together metrics that are similar. For more information, see Namespaces.
The value to publish to the CloudWatch metric when a filter pattern matches a log event.
(Optional) The value to emit when a filter pattern does not match a log event. This value can be null.
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.
To help prevent accidental high charges, Amazon disables a metric filter if it generates 1000 different name/value pairs for the dimensions that you have specified within a certain amount of time.
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.
The unit to assign to the metric. If you omit this, the unit is set as None
.
Creates a new builder-style object to manufacture MetricTransformation
Trait Implementations
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
Auto Trait Implementations
impl RefUnwindSafe for MetricTransformation
impl Send for MetricTransformation
impl Sync for MetricTransformation
impl Unpin for MetricTransformation
impl UnwindSafe for MetricTransformation
Blanket Implementations
Mutably borrows from an owned value. Read more
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more