public static interface CfnAppMonitor.MetricDefinitionProperty
Valid destinations include CloudWatch and Evidently.
By default, RUM app monitors send some metrics to CloudWatch . These default metrics are listed in CloudWatch metrics that you can collect with CloudWatch RUM .
If you also send extended metrics, you can send metrics to Evidently as well as CloudWatch , and you can also optionally send the metrics with additional dimensions. The valid dimension names for the additional dimensions are BrowserName
, CountryCode
, DeviceType
, FileType
, OSName
, and PageId
. For more information, see Extended metrics that you can send to CloudWatch and CloudWatch Evidently .
The maximum number of metric definitions that one destination can contain is 2000.
Extended metrics sent are charged as CloudWatch custom metrics. Each combination of additional dimension name and dimension value counts as a custom metric.
If some metric definitions that you specify are not valid, then the operation will not modify any metric definitions even if other metric definitions specified are valid.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import software.amazon.awscdk.services.rum.*; MetricDefinitionProperty metricDefinitionProperty = MetricDefinitionProperty.builder() .name("name") // the properties below are optional .dimensionKeys(Map.of( "dimensionKeysKey", "dimensionKeys")) .eventPattern("eventPattern") .unitLabel("unitLabel") .valueKey("valueKey") .build();
Modifier and Type | Interface and Description |
---|---|
static class |
CfnAppMonitor.MetricDefinitionProperty.Builder
A builder for
CfnAppMonitor.MetricDefinitionProperty |
static class |
CfnAppMonitor.MetricDefinitionProperty.Jsii$Proxy
An implementation for
CfnAppMonitor.MetricDefinitionProperty |
Modifier and Type | Method and Description |
---|---|
static CfnAppMonitor.MetricDefinitionProperty.Builder |
builder() |
default java.lang.Object |
getDimensionKeys()
This field is a map of field paths to dimension names.
|
default java.lang.String |
getEventPattern()
The pattern that defines the metric.
|
java.lang.String |
getName()
The name of the metric that is defined in this structure.
|
default java.lang.String |
getUnitLabel()
Use this field only if you are sending this metric to CloudWatch .
|
default java.lang.String |
getValueKey()
The field within the event object that the metric value is sourced from.
|
java.lang.String getName()
default java.lang.Object getDimensionKeys()
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.
default java.lang.String getEventPattern()
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.
default java.lang.String getUnitLabel()
It defines the CloudWatch metric unit that this metric is measured in.
default java.lang.String getValueKey()
static CfnAppMonitor.MetricDefinitionProperty.Builder builder()