Struct rusoto_logs::MetricTransformation
source · [−]pub struct MetricTransformation {
pub default_value: Option<f64>,
pub dimensions: Option<HashMap<String, String>>,
pub metric_name: String,
pub metric_namespace: String,
pub metric_value: String,
pub unit: Option<String>,
}
Expand description
Indicates how to transform ingested log events to metric data in a CloudWatch metric.
Fields
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 AWS Charges.
metric_name: String
The name of the CloudWatch metric.
metric_namespace: 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: String
The value to publish to the CloudWatch metric when a filter pattern matches a log event.
unit: Option<String>
The unit to assign to the metric. If you omit this, the unit is set as None
.
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 Default for MetricTransformation
impl Default for MetricTransformation
sourcefn default() -> MetricTransformation
fn default() -> MetricTransformation
Returns the “default value” for a type. Read more
sourceimpl<'de> Deserialize<'de> for MetricTransformation
impl<'de> Deserialize<'de> for MetricTransformation
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
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 !=
.
sourceimpl Serialize for MetricTransformation
impl Serialize for MetricTransformation
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