Struct aws_sdk_cloudwatchlogs::model::MetricTransformation
source · [−]#[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
sourceimpl MetricTransformation
impl MetricTransformation
sourcepub fn metric_name(&self) -> Option<&str>
pub fn metric_name(&self) -> Option<&str>
The name of the CloudWatch metric.
sourcepub fn metric_namespace(&self) -> Option<&str>
pub fn metric_namespace(&self) -> Option<&str>
A custom namespace to contain your metric in CloudWatch. Use namespaces to group together metrics that are similar. For more information, see Namespaces.
sourcepub fn metric_value(&self) -> Option<&str>
pub fn metric_value(&self) -> Option<&str>
The value to publish to the CloudWatch metric when a filter pattern matches a log event.
sourcepub fn default_value(&self) -> Option<f64>
pub fn default_value(&self) -> Option<f64>
(Optional) The value to emit when a filter pattern does not match a log event. This value can be null.
sourcepub fn dimensions(&self) -> Option<&HashMap<String, String>>
pub fn dimensions(&self) -> 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.
sourcepub fn unit(&self) -> Option<&StandardUnit>
pub fn unit(&self) -> Option<&StandardUnit>
The unit to assign to the metric. If you omit this, the unit is set as None
.
sourceimpl MetricTransformation
impl MetricTransformation
sourcepub fn builder() -> Builder
pub fn builder() -> Builder
Creates a new builder-style object to manufacture MetricTransformation
Trait Implementations
sourceimpl Clone for MetricTransformation
impl Clone for MetricTransformation
sourcefn clone(&self) -> MetricTransformation
fn clone(&self) -> MetricTransformation
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for MetricTransformation
impl Debug for MetricTransformation
sourceimpl PartialEq<MetricTransformation> for MetricTransformation
impl PartialEq<MetricTransformation> for MetricTransformation
sourcefn eq(&self, other: &MetricTransformation) -> bool
fn eq(&self, other: &MetricTransformation) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &MetricTransformation) -> bool
fn ne(&self, other: &MetricTransformation) -> bool
This method tests for !=
.
impl StructuralPartialEq for MetricTransformation
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more