Resource: awsRumAppMonitor
Provides a CloudWatch RUM App Monitor resource.
Example Usage
/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as aws from "./.gen/providers/aws";
new aws.rumAppMonitor.RumAppMonitor(this, "example", {
domain: "localhost",
name: "example",
});
Argument Reference
The following arguments are supported:
name
- (Required) The name of the log stream.domain
- (Required) The top-level internet domain name for which your application has administrative authority.appMonitorConfiguration
- (Optional) configuration data for the app monitor. See app_monitor_configuration below.cwLogEnabled
- (Optional) Data collected by RUM is kept by RUM for 30 days and then deleted. This parameter specifies whether RUM sends a copy of this telemetry data to Amazon CloudWatch Logs in your account. This enables you to keep the telemetry data for more than 30 days, but it does incur Amazon CloudWatch Logs charges. Default value isfalse
.customEvents
- (Optional) Specifies whether this app monitor allows the web client to define and send custom events. If you omit this parameter, custom events aredisabled
. See custom_events below.tags
- (Optional) A map of tags to assign to the resource. If configured with a providerdefaultTags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.
appMonitorConfiguration
allowCookies
- (Optional) If you set this totrue
, RUM web client sets two cookies, a session cookie and a user cookie. The cookies allow the RUM web client to collect data relating to the number of users an application has and the behavior of the application across a sequence of events. Cookies are stored in the top-level domain of the current page.enableXray
- (Optional) If you set this totrue
, RUM enables X-Ray tracing for the user sessions that RUM samples. RUM adds an X-Ray trace header to allowed HTTP requests. It also records an X-Ray segment for allowed HTTP requests.excludedPages
- (Optional) A list of URLs in your website or application to exclude from RUM data collection.favoritePages
- (Optional) A list of pages in the CloudWatch RUM console that are to be displayed with a "favorite" icon.guestRoleArn
- (Optional) The ARN of the guest IAM role that is attached to the Amazon Cognito identity pool that is used to authorize the sending of data to RUM.identityPoolId
- (Optional) The ID of the Amazon Cognito identity pool that is used to authorize the sending of data to RUM.includedPages
- (Optional) If this app monitor is to collect data from only certain pages in your application, this structure lists those pages.sessionSampleRate
- (Optional) Specifies the percentage of user sessions to use for RUM data collection. Choosing a higher percentage gives you more data but also incurs more costs. The number you specify is the percentage of user sessions that will be used. Default value is01
.telemetries
- (Optional) An array that lists the types of telemetry data that this app monitor is to collect. Valid values areerrors
,performance
, andhttp
.
customEvents
status
- (Optional) Specifies whether this app monitor allows the web client to define and send custom events. The default is for custom events to bedisabled
. Valid values aredisabled
andenabled
.
Attributes Reference
In addition to all arguments above, the following attributes are exported:
arn
- The Amazon Resource Name (ARN) specifying the app monitor.id
- The CloudWatch RUM name as it is the identifier of a RUM.appMonitorId
- The unique ID of the app monitor. Useful for JS templates.cwLogGroup
- The name of the log group where the copies are stored.tagsAll
- A map of tags assigned to the resource, including those inherited from the providerdefaultTags
configuration block.
Import
Cloudwatch RUM App Monitor can be imported using the name
, e.g.,