Struct aws_sdk_rum::types::MetricDefinition
source · #[non_exhaustive]pub struct MetricDefinition {
pub metric_definition_id: String,
pub name: String,
pub value_key: Option<String>,
pub unit_label: Option<String>,
pub dimension_keys: Option<HashMap<String, String>>,
pub event_pattern: Option<String>,
pub namespace: Option<String>,
}
Expand description
A structure that displays the definition of one extended metric that RUM sends to CloudWatch or CloudWatch Evidently. For more information, see Additional metrics that you can send to CloudWatch and CloudWatch Evidently.
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_definition_id: String
The ID of this metric definition.
name: String
The name of the metric that is defined in this structure.
value_key: Option<String>
The field within the event object that the metric value is sourced from.
unit_label: Option<String>
Use this field only if you are sending this metric to CloudWatch. It defines the CloudWatch metric unit that this metric is measured in.
dimension_keys: Option<HashMap<String, String>>
This field is a map of field paths to dimension names. It defines the dimensions to associate with this metric in CloudWatch The value of this field is used only if the metric destination is CloudWatch
. If the metric destination is Evidently
, the value of DimensionKeys
is ignored.
event_pattern: Option<String>
The pattern that defines the metric. RUM checks events that happen in a user's session against the pattern, and events that match the pattern are sent to the metric destination.
If the metrics destination is CloudWatch
and the event also matches a value in DimensionKeys
, then the metric is published with the specified dimensions.
namespace: Option<String>
If this metric definition is for a custom metric instead of an extended metric, this field displays the metric namespace that the custom metric is published to.
Implementations§
source§impl MetricDefinition
impl MetricDefinition
sourcepub fn metric_definition_id(&self) -> &str
pub fn metric_definition_id(&self) -> &str
The ID of this metric definition.
sourcepub fn value_key(&self) -> Option<&str>
pub fn value_key(&self) -> Option<&str>
The field within the event object that the metric value is sourced from.
sourcepub fn unit_label(&self) -> Option<&str>
pub fn unit_label(&self) -> Option<&str>
Use this field only if you are sending this metric to CloudWatch. It defines the CloudWatch metric unit that this metric is measured in.
sourcepub fn dimension_keys(&self) -> Option<&HashMap<String, String>>
pub fn dimension_keys(&self) -> Option<&HashMap<String, String>>
This field is a map of field paths to dimension names. It defines the dimensions to associate with this metric in CloudWatch The value of this field is used only if the metric destination is CloudWatch
. If the metric destination is Evidently
, the value of DimensionKeys
is ignored.
sourcepub fn event_pattern(&self) -> Option<&str>
pub fn event_pattern(&self) -> Option<&str>
The pattern that defines the metric. RUM checks events that happen in a user's session against the pattern, and events that match the pattern are sent to the metric destination.
If the metrics destination is CloudWatch
and the event also matches a value in DimensionKeys
, then the metric is published with the specified dimensions.
source§impl MetricDefinition
impl MetricDefinition
sourcepub fn builder() -> MetricDefinitionBuilder
pub fn builder() -> MetricDefinitionBuilder
Creates a new builder-style object to manufacture MetricDefinition
.
Trait Implementations§
source§impl Clone for MetricDefinition
impl Clone for MetricDefinition
source§fn clone(&self) -> MetricDefinition
fn clone(&self) -> MetricDefinition
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for MetricDefinition
impl Debug for MetricDefinition
source§impl PartialEq for MetricDefinition
impl PartialEq for MetricDefinition
source§fn eq(&self, other: &MetricDefinition) -> bool
fn eq(&self, other: &MetricDefinition) -> bool
self
and other
values to be equal, and is used
by ==
.