Class: AWSCDK::RUM::CfnAppMonitor::AppMonitorConfigurationProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
rum/cfn_app_monitor.rb

Overview

This structure contains much of the configuration data for the app monitor.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(allow_cookies: nil, enable_x_ray: nil, excluded_pages: nil, favorite_pages: nil, guest_role_arn: nil, identity_pool_id: nil, included_pages: nil, metric_destinations: nil, session_sample_rate: nil, telemetries: nil) ⇒ AppMonitorConfigurationProperty

Returns a new instance of AppMonitorConfigurationProperty.

Parameters:

  • allow_cookies (Boolean, AWSCDK::IResolvable, nil) (defaults to: nil)

    If you set this to true , the CloudWatch RUM web client sets two cookies, a session cookie and a user cookie.

  • enable_x_ray (Boolean, AWSCDK::IResolvable, nil) (defaults to: nil)

    If you set this to true , CloudWatch RUM sends client-side traces to X-Ray for each sampled session.

  • excluded_pages (Array<String>, nil) (defaults to: nil)

    A list of URLs in your website or application to exclude from RUM data collection.

  • favorite_pages (Array<String>, nil) (defaults to: nil)

    A list of pages in your application that are to be displayed with a "favorite" icon in the CloudWatch RUM console.

  • guest_role_arn (String, nil) (defaults to: nil)

    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 CloudWatch RUM.

  • identity_pool_id (String, nil) (defaults to: nil)

    The ID of the Amazon Cognito identity pool that is used to authorize the sending of data to CloudWatch RUM.

  • included_pages (Array<String>, nil) (defaults to: nil)

    If this app monitor is to collect data from only certain pages in your application, this structure lists those pages.

  • metric_destinations (AWSCDK::IResolvable, Array<AWSCDK::IResolvable, AWSCDK::RUM::CfnAppMonitor::MetricDestinationProperty>, nil) (defaults to: nil)

    An array of structures that each define a destination that this app monitor will send extended metrics to.

  • session_sample_rate (Numeric, nil) (defaults to: nil)

    Specifies the portion of user sessions to use for CloudWatch RUM data collection.

  • telemetries (Array<String>, nil) (defaults to: nil)

    An array that lists the types of telemetry data that this app monitor is to collect.



651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
# File 'rum/cfn_app_monitor.rb', line 651

def initialize(allow_cookies: nil, enable_x_ray: nil, excluded_pages: nil, favorite_pages: nil, guest_role_arn: nil, identity_pool_id: nil, included_pages: nil, metric_destinations: nil, session_sample_rate: nil, telemetries: nil)
  @allow_cookies = allow_cookies
  Jsii::Type.check_type(@allow_cookies, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "allowCookies") unless @allow_cookies.nil?
  @enable_x_ray = enable_x_ray
  Jsii::Type.check_type(@enable_x_ray, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "enableXRay") unless @enable_x_ray.nil?
  @excluded_pages = excluded_pages
  Jsii::Type.check_type(@excluded_pages, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "excludedPages") unless @excluded_pages.nil?
  @favorite_pages = favorite_pages
  Jsii::Type.check_type(@favorite_pages, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "favoritePages") unless @favorite_pages.nil?
  @guest_role_arn = guest_role_arn
  Jsii::Type.check_type(@guest_role_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "guestRoleArn") unless @guest_role_arn.nil?
  @identity_pool_id = identity_pool_id
  Jsii::Type.check_type(@identity_pool_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "identityPoolId") unless @identity_pool_id.nil?
  @included_pages = included_pages
  Jsii::Type.check_type(@included_pages, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "includedPages") unless @included_pages.nil?
  @metric_destinations = metric_destinations
  Jsii::Type.check_type(@metric_destinations, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfcnVtLkNmbkFwcE1vbml0b3IuTWV0cmljRGVzdGluYXRpb25Qcm9wZXJ0eSJ9XX19LCJraW5kIjoiYXJyYXkifX1dfX0=")), "metricDestinations") unless @metric_destinations.nil?
  @session_sample_rate = session_sample_rate
  Jsii::Type.check_type(@session_sample_rate, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "sessionSampleRate") unless @session_sample_rate.nil?
  @telemetries = telemetries
  Jsii::Type.check_type(@telemetries, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "telemetries") unless @telemetries.nil?
end

Instance Attribute Details

#allow_cookiesBoolean, ... (readonly)

If you set this to true , the CloudWatch RUM web client sets two cookies, a session cookie and a user cookie.

The cookies allow the CloudWatch 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.



680
681
682
# File 'rum/cfn_app_monitor.rb', line 680

def allow_cookies
  @allow_cookies
end

#enable_x_rayBoolean, ... (readonly)

If you set this to true , CloudWatch RUM sends client-side traces to X-Ray for each sampled session.

You can then see traces and segments from these user sessions in the RUM dashboard and the CloudWatch ServiceLens console. For more information, see What is AWS X-Ray ?



687
688
689
# File 'rum/cfn_app_monitor.rb', line 687

def enable_x_ray
  @enable_x_ray
end

#excluded_pagesArray<String>? (readonly)

A list of URLs in your website or application to exclude from RUM data collection.

You can't include both ExcludedPages and IncludedPages in the same app monitor.



694
695
696
# File 'rum/cfn_app_monitor.rb', line 694

def excluded_pages
  @excluded_pages
end

#favorite_pagesArray<String>? (readonly)

A list of pages in your application that are to be displayed with a "favorite" icon in the CloudWatch RUM console.



699
700
701
# File 'rum/cfn_app_monitor.rb', line 699

def favorite_pages
  @favorite_pages
end

#guest_role_arnString? (readonly)

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 CloudWatch RUM.



704
705
706
# File 'rum/cfn_app_monitor.rb', line 704

def guest_role_arn
  @guest_role_arn
end

#identity_pool_idString? (readonly)

The ID of the Amazon Cognito identity pool that is used to authorize the sending of data to CloudWatch RUM.



709
710
711
# File 'rum/cfn_app_monitor.rb', line 709

def identity_pool_id
  @identity_pool_id
end

#included_pagesArray<String>? (readonly)

If this app monitor is to collect data from only certain pages in your application, this structure lists those pages.

You can't include both ExcludedPages and IncludedPages in the same app monitor.



716
717
718
# File 'rum/cfn_app_monitor.rb', line 716

def included_pages
  @included_pages
end

#metric_destinationsAWSCDK::IResolvable, ... (readonly)

An array of structures that each define a destination that this app monitor will send extended metrics to.



721
722
723
# File 'rum/cfn_app_monitor.rb', line 721

def metric_destinations
  @metric_destinations
end

#session_sample_rateNumeric? (readonly)

Specifies the portion of user sessions to use for CloudWatch RUM data collection.

Choosing a higher portion gives you more data but also incurs more costs.

The range for this value is 0 to 1 inclusive. Setting this to 1 means that 100% of user sessions are sampled, and setting it to 0.1 means that 10% of user sessions are sampled.

If you omit this parameter, the default of 0.1 is used, and 10% of sessions will be sampled.



732
733
734
# File 'rum/cfn_app_monitor.rb', line 732

def session_sample_rate
  @session_sample_rate
end

#telemetriesArray<String>? (readonly)

An array that lists the types of telemetry data that this app monitor is to collect.

  • errors indicates that RUM collects data about unhandled JavaScript errors raised by your application.
  • performance indicates that RUM collects performance data about how your application and its resources are loaded and rendered. This includes Core Web Vitals.
  • http indicates that RUM collects data about HTTP errors thrown by your application.


741
742
743
# File 'rum/cfn_app_monitor.rb', line 741

def telemetries
  @telemetries
end

Class Method Details

.jsii_propertiesObject



743
744
745
746
747
748
749
750
751
752
753
754
755
756
# File 'rum/cfn_app_monitor.rb', line 743

def self.jsii_properties
  {
    :allow_cookies => "allowCookies",
    :enable_x_ray => "enableXRay",
    :excluded_pages => "excludedPages",
    :favorite_pages => "favoritePages",
    :guest_role_arn => "guestRoleArn",
    :identity_pool_id => "identityPoolId",
    :included_pages => "includedPages",
    :metric_destinations => "metricDestinations",
    :session_sample_rate => "sessionSampleRate",
    :telemetries => "telemetries",
  }
end

Instance Method Details

#to_jsiiObject



758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
# File 'rum/cfn_app_monitor.rb', line 758

def to_jsii
  result = {}
  result.merge!({
    "allowCookies" => @allow_cookies,
    "enableXRay" => @enable_x_ray,
    "excludedPages" => @excluded_pages,
    "favoritePages" => @favorite_pages,
    "guestRoleArn" => @guest_role_arn,
    "identityPoolId" => @identity_pool_id,
    "includedPages" => @included_pages,
    "metricDestinations" => @metric_destinations,
    "sessionSampleRate" => @session_sample_rate,
    "telemetries" => @telemetries,
  })
  result.compact
end