Class AppMonitorConfiguration

java.lang.Object
software.amazon.awssdk.services.rum.model.AppMonitorConfiguration
All Implemented Interfaces:
Serializable, SdkPojo, ToCopyableBuilder<AppMonitorConfiguration.Builder,AppMonitorConfiguration>

@Generated("software.amazon.awssdk:codegen") public final class AppMonitorConfiguration extends Object implements SdkPojo, Serializable, ToCopyableBuilder<AppMonitorConfiguration.Builder,AppMonitorConfiguration>

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

See Also:
  • Method Details

    • allowCookies

      public final Boolean allowCookies()

      If you set this to true, the 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.

      Returns:
      If you set this to true, the 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

      public final Boolean enableXRay()

      If you set this to true, 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. You can see traces and segments from these user sessions in the X-Ray console and the CloudWatch ServiceLens console. For more information, see What is X-Ray?

      Returns:
      If you set this to true, 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. You can see traces and segments from these user sessions in the X-Ray console and the CloudWatch ServiceLens console. For more information, see What is X-Ray?
    • hasExcludedPages

      public final boolean hasExcludedPages()
      For responses, this returns true if the service returned a value for the ExcludedPages property. This DOES NOT check that the value is non-empty (for which, you should check the isEmpty() method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified.
    • excludedPages

      public final List<String> excludedPages()

      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 operation.

      Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.

      This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the hasExcludedPages() method.

      Returns:
      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 operation.

    • hasFavoritePages

      public final boolean hasFavoritePages()
      For responses, this returns true if the service returned a value for the FavoritePages property. This DOES NOT check that the value is non-empty (for which, you should check the isEmpty() method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified.
    • favoritePages

      public final List<String> favoritePages()

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

      Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.

      This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the hasFavoritePages() method.

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

      public final String guestRoleArn()

      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.

      It is possible that an app monitor does not have a value for GuestRoleArn. For example, this can happen when you use the console to create an app monitor and you allow CloudWatch RUM to create a new identity pool for Authorization. In this case, GuestRoleArn is not present in the GetAppMonitor response because it is not stored by the service.

      If this issue affects you, you can take one of the following steps:

      • Use the Cloud Development Kit (CDK) to create an identity pool and the associated IAM role, and use that for your app monitor.

      • Make a separate GetIdentityPoolRoles call to Amazon Cognito to retrieve the GuestRoleArn.

      Returns:
      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.

      It is possible that an app monitor does not have a value for GuestRoleArn. For example, this can happen when you use the console to create an app monitor and you allow CloudWatch RUM to create a new identity pool for Authorization. In this case, GuestRoleArn is not present in the GetAppMonitor response because it is not stored by the service.

      If this issue affects you, you can take one of the following steps:

      • Use the Cloud Development Kit (CDK) to create an identity pool and the associated IAM role, and use that for your app monitor.

      • Make a separate GetIdentityPoolRoles call to Amazon Cognito to retrieve the GuestRoleArn.

    • identityPoolId

      public final String identityPoolId()

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

      Returns:
      The ID of the Amazon Cognito identity pool that is used to authorize the sending of data to RUM.
    • hasIncludedPages

      public final boolean hasIncludedPages()
      For responses, this returns true if the service returned a value for the IncludedPages property. This DOES NOT check that the value is non-empty (for which, you should check the isEmpty() method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified.
    • includedPages

      public final List<String> includedPages()

      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 operation.

      Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.

      This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the hasIncludedPages() method.

      Returns:
      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 operation.

    • sessionSampleRate

      public final Double sessionSampleRate()

      Specifies the portion of user sessions to use for 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.

      Returns:
      Specifies the portion of user sessions to use for 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.

    • telemetries

      public final List<Telemetry> telemetries()

      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.

      Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.

      This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the hasTelemetries() method.

      Returns:
      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.

    • hasTelemetries

      public final boolean hasTelemetries()
      For responses, this returns true if the service returned a value for the Telemetries property. This DOES NOT check that the value is non-empty (for which, you should check the isEmpty() method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified.
    • telemetriesAsStrings

      public final List<String> telemetriesAsStrings()

      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.

      Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.

      This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the hasTelemetries() method.

      Returns:
      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.

    • toBuilder

      public AppMonitorConfiguration.Builder toBuilder()
      Description copied from interface: ToCopyableBuilder
      Take this object and create a builder that contains all of the current property values of this object.
      Specified by:
      toBuilder in interface ToCopyableBuilder<AppMonitorConfiguration.Builder,AppMonitorConfiguration>
      Returns:
      a builder for type T
    • builder

      public static AppMonitorConfiguration.Builder builder()
    • serializableBuilderClass

      public static Class<? extends AppMonitorConfiguration.Builder> serializableBuilderClass()
    • hashCode

      public final int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public final boolean equals(Object obj)
      Overrides:
      equals in class Object
    • equalsBySdkFields

      public final boolean equalsBySdkFields(Object obj)
      Description copied from interface: SdkPojo
      Indicates whether some other object is "equal to" this one by SDK fields. An SDK field is a modeled, non-inherited field in an SdkPojo class, and is generated based on a service model.

      If an SdkPojo class does not have any inherited fields, equalsBySdkFields and equals are essentially the same.

      Specified by:
      equalsBySdkFields in interface SdkPojo
      Parameters:
      obj - the object to be compared with
      Returns:
      true if the other object equals to this object by sdk fields, false otherwise.
    • toString

      public final String toString()
      Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be redacted from this string using a placeholder value.
      Overrides:
      toString in class Object
    • getValueForField

      public final <T> Optional<T> getValueForField(String fieldName, Class<T> clazz)
    • sdkFields

      public final List<SdkField<?>> sdkFields()
      Specified by:
      sdkFields in interface SdkPojo
      Returns:
      List of SdkField in this POJO. May be empty list but should never be null.
    • sdkFieldNameToField

      public final Map<String,SdkField<?>> sdkFieldNameToField()
      Specified by:
      sdkFieldNameToField in interface SdkPojo
      Returns:
      The mapping between the field name and its corresponding field.