Class AppMonitorConfiguration
- All Implemented Interfaces:
Serializable
,SdkPojo
,ToCopyableBuilder<AppMonitorConfiguration.Builder,
AppMonitorConfiguration>
This structure contains much of the configuration data for the app monitor.
- See Also:
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionfinal Boolean
If you set this totrue
, the RUM web client sets two cookies, a session cookie and a user cookie.builder()
final Boolean
If you set this totrue
, RUM enables X-Ray tracing for the user sessions that RUM samples.final boolean
final boolean
equalsBySdkFields
(Object obj) Indicates whether some other object is "equal to" this one by SDK fields.A list of URLs in your website or application to exclude from RUM data collection.A list of pages in your application that are to be displayed with a "favorite" icon in the CloudWatch RUM console.final <T> Optional
<T> getValueForField
(String fieldName, Class<T> clazz) final String
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.final boolean
For responses, this returns true if the service returned a value for the ExcludedPages property.final boolean
For responses, this returns true if the service returned a value for the FavoritePages property.final int
hashCode()
final boolean
For responses, this returns true if the service returned a value for the IncludedPages property.final boolean
For responses, this returns true if the service returned a value for the Telemetries property.final String
The ID of the Amazon Cognito identity pool that is used to authorize the sending of data to RUM.If this app monitor is to collect data from only certain pages in your application, this structure lists those pages.static Class
<? extends AppMonitorConfiguration.Builder> final Double
Specifies the portion of user sessions to use for RUM data collection.An array that lists the types of telemetry data that this app monitor is to collect.An array that lists the types of telemetry data that this app monitor is to collect.Take this object and create a builder that contains all of the current property values of this object.final String
toString()
Returns a string representation of this object.Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
Method Details
-
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
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 theisEmpty()
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
A list of URLs in your website or application to exclude from RUM data collection.
You can't include both
ExcludedPages
andIncludedPages
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
andIncludedPages
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 theisEmpty()
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
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
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
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 theisEmpty()
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
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
andIncludedPages
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
andIncludedPages
in the same operation.
-
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
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 theisEmpty()
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
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
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 interfaceToCopyableBuilder<AppMonitorConfiguration.Builder,
AppMonitorConfiguration> - Returns:
- a builder for type T
-
builder
-
serializableBuilderClass
-
hashCode
-
equals
-
equalsBySdkFields
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 anSdkPojo
class, and is generated based on a service model.If an
SdkPojo
class does not have any inherited fields,equalsBySdkFields
andequals
are essentially the same.- Specified by:
equalsBySdkFields
in interfaceSdkPojo
- Parameters:
obj
- the object to be compared with- Returns:
- true if the other object equals to this object by sdk fields, false otherwise.
-
toString
-
getValueForField
-
sdkFields
-
sdkFieldNameToField
- Specified by:
sdkFieldNameToField
in interfaceSdkPojo
- Returns:
- The mapping between the field name and its corresponding field.
-