rum

package module
v1.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 21, 2021 License: Apache-2.0 Imports: 31 Imported by: 6

Documentation

Overview

Package rum provides the API client, operations, and parameter types for CloudWatch RUM.

With Amazon CloudWatch RUM, you can perform real-user monitoring to collect client-side data about your web application performance from actual user sessions in real time. The data collected includes page load times, client-side errors, and user behavior. When you view this data, you can see it all aggregated together and also see breakdowns by the browsers and devices that your customers use. You can use the collected data to quickly identify and debug client-side performance issues. CloudWatch RUM helps you visualize anomalies in your application performance and find relevant debugging data such as error messages, stack traces, and user sessions. You can also use RUM to understand the range of end-user impact including the number of users, geolocations, and browsers used.

Index

Constants

View Source
const ServiceAPIVersion = "2018-05-10"
View Source
const ServiceID = "RUM"

Variables

This section is empty.

Functions

func NewDefaultEndpointResolver

func NewDefaultEndpointResolver() *internalendpoints.Resolver

NewDefaultEndpointResolver constructs a new service endpoint resolver

func WithAPIOptions

func WithAPIOptions(optFns ...func(*middleware.Stack) error) func(*Options)

WithAPIOptions returns a functional option for setting the Client's APIOptions option.

func WithEndpointResolver

func WithEndpointResolver(v EndpointResolver) func(*Options)

WithEndpointResolver returns a functional option for setting the Client's EndpointResolver option.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client provides the API client to make operations call for CloudWatch RUM.

func New

func New(options Options, optFns ...func(*Options)) *Client

New returns an initialized Client based on the functional options. Provide additional functional options to further configure the behavior of the client, such as changing the client's endpoint or adding custom middleware behavior.

func NewFromConfig

func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client

NewFromConfig returns a new client from the provided config.

func (*Client) CreateAppMonitor

func (c *Client) CreateAppMonitor(ctx context.Context, params *CreateAppMonitorInput, optFns ...func(*Options)) (*CreateAppMonitorOutput, error)

Creates a Amazon CloudWatch RUM app monitor, which collects telemetry data from your application and sends that data to RUM. The data includes performance and reliability information such as page load time, client-side errors, and user behavior. You use this operation only to create a new app monitor. To update an existing app monitor, use UpdateAppMonitor (https://docs.aws.amazon.com/cloudwatchrum/latest/APIReference/API_UpdateAppMonitor.html) instead. After you create an app monitor, sign in to the CloudWatch RUM console to get the JavaScript code snippet to add to your web application. For more information, see How do I find a code snippet that I've already generated? (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-RUM-find-code-snippet.html)

func (*Client) DeleteAppMonitor

func (c *Client) DeleteAppMonitor(ctx context.Context, params *DeleteAppMonitorInput, optFns ...func(*Options)) (*DeleteAppMonitorOutput, error)

Deletes an existing app monitor. This immediately stops the collection of data.

func (*Client) GetAppMonitor

func (c *Client) GetAppMonitor(ctx context.Context, params *GetAppMonitorInput, optFns ...func(*Options)) (*GetAppMonitorOutput, error)

Retrieves the complete configuration information for one app monitor.

func (*Client) GetAppMonitorData

func (c *Client) GetAppMonitorData(ctx context.Context, params *GetAppMonitorDataInput, optFns ...func(*Options)) (*GetAppMonitorDataOutput, error)

Retrieves the raw performance events that RUM has collected from your web application, so that you can do your own processing or analysis of this data.

func (*Client) ListAppMonitors

func (c *Client) ListAppMonitors(ctx context.Context, params *ListAppMonitorsInput, optFns ...func(*Options)) (*ListAppMonitorsOutput, error)

Returns a list of the Amazon CloudWatch RUM app monitors in the account.

func (*Client) ListTagsForResource

func (c *Client) ListTagsForResource(ctx context.Context, params *ListTagsForResourceInput, optFns ...func(*Options)) (*ListTagsForResourceOutput, error)

Displays the tags associated with a CloudWatch RUM resource.

func (*Client) PutRumEvents

func (c *Client) PutRumEvents(ctx context.Context, params *PutRumEventsInput, optFns ...func(*Options)) (*PutRumEventsOutput, error)

Sends telemetry events about your application performance and user behavior to CloudWatch RUM. The code snippet that RUM generates for you to add to your application includes PutRumEvents operations to send this data to RUM. Each PutRumEvents operation can send a batch of events from one user session.

func (*Client) TagResource

func (c *Client) TagResource(ctx context.Context, params *TagResourceInput, optFns ...func(*Options)) (*TagResourceOutput, error)

Assigns one or more tags (key-value pairs) to the specified CloudWatch RUM resource. Currently, the only resources that can be tagged app monitors. Tags can help you organize and categorize your resources. You can also use them to scope user permissions by granting a user permission to access or change only resources with certain tag values. Tags don't have any semantic meaning to Amazon Web Services and are interpreted strictly as strings of characters. You can use the TagResource action with a resource that already has tags. If you specify a new tag key for the resource, this tag is appended to the list of tags associated with the alarm. If you specify a tag key that is already associated with the resource, the new tag value that you specify replaces the previous value for that tag. You can associate as many as 50 tags with a resource. For more information, see Tagging Amazon Web Services resources (https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html).

func (*Client) UntagResource

func (c *Client) UntagResource(ctx context.Context, params *UntagResourceInput, optFns ...func(*Options)) (*UntagResourceOutput, error)

Removes one or more tags from the specified resource.

func (*Client) UpdateAppMonitor

func (c *Client) UpdateAppMonitor(ctx context.Context, params *UpdateAppMonitorInput, optFns ...func(*Options)) (*UpdateAppMonitorOutput, error)

Updates the configuration of an existing app monitor. When you use this operation, only the parts of the app monitor configuration that you specify in this operation are changed. For any parameters that you omit, the existing values are kept. You can't use this operation to change the tags of an existing app monitor. To change the tags of an existing app monitor, use TagResource (https://docs.aws.amazon.com/cloudwatchrum/latest/APIReference/API_TagResource.html). To create a new app monitor, use CreateAppMonitor (https://docs.aws.amazon.com/cloudwatchrum/latest/APIReference/API_CreateAppMonitor.html). After you update an app monitor, sign in to the CloudWatch RUM console to get the updated JavaScript code snippet to add to your web application. For more information, see How do I find a code snippet that I've already generated? (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-RUM-find-code-snippet.html)

type CreateAppMonitorInput

type CreateAppMonitorInput struct {

	// The top-level internet domain name for which your application has administrative
	// authority.
	//
	// This member is required.
	Domain *string

	// A name for the app monitor.
	//
	// This member is required.
	Name *string

	// A structure that contains much of the configuration data for the app monitor. If
	// you are using Amazon Cognito for authorization, you must include this structure
	// in your request, and it must include the ID of the Amazon Cognito identity pool
	// to use for authorization. If you don't include AppMonitorConfiguration, you must
	// set up your own authorization method. For more information, see Authorize your
	// application to send data to Amazon Web Services
	// (https://docs.aws.amazon.com/monitoring/CloudWatch-RUM-get-started-authorization.html).
	// If you omit this argument, the sample rate used for RUM is set to 10% of the
	// user sessions.
	AppMonitorConfiguration *types.AppMonitorConfiguration

	// 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. If you omit
	// this parameter, the default is false.
	CwLogEnabled *bool

	// Assigns one or more tags (key-value pairs) to the app monitor. Tags can help you
	// organize and categorize your resources. You can also use them to scope user
	// permissions by granting a user permission to access or change only resources
	// with certain tag values. Tags don't have any semantic meaning to Amazon Web
	// Services and are interpreted strictly as strings of characters. You can
	// associate as many as 50 tags with an app monitor. For more information, see
	// Tagging Amazon Web Services resources
	// (https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html).
	Tags map[string]string
	// contains filtered or unexported fields
}

type CreateAppMonitorOutput

type CreateAppMonitorOutput struct {

	// The unique ID of the new app monitor.
	Id *string

	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
	// contains filtered or unexported fields
}

type DeleteAppMonitorInput

type DeleteAppMonitorInput struct {

	// The name of the app monitor to delete.
	//
	// This member is required.
	Name *string
	// contains filtered or unexported fields
}

type DeleteAppMonitorOutput

type DeleteAppMonitorOutput struct {
	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
	// contains filtered or unexported fields
}

type EndpointResolver

type EndpointResolver interface {
	ResolveEndpoint(region string, options EndpointResolverOptions) (aws.Endpoint, error)
}

EndpointResolver interface for resolving service endpoints.

func EndpointResolverFromURL

func EndpointResolverFromURL(url string, optFns ...func(*aws.Endpoint)) EndpointResolver

EndpointResolverFromURL returns an EndpointResolver configured using the provided endpoint url. By default, the resolved endpoint resolver uses the client region as signing region, and the endpoint source is set to EndpointSourceCustom.You can provide functional options to configure endpoint values for the resolved endpoint.

type EndpointResolverFunc

type EndpointResolverFunc func(region string, options EndpointResolverOptions) (aws.Endpoint, error)

EndpointResolverFunc is a helper utility that wraps a function so it satisfies the EndpointResolver interface. This is useful when you want to add additional endpoint resolving logic, or stub out specific endpoints with custom values.

func (EndpointResolverFunc) ResolveEndpoint

func (fn EndpointResolverFunc) ResolveEndpoint(region string, options EndpointResolverOptions) (endpoint aws.Endpoint, err error)

type EndpointResolverOptions

type EndpointResolverOptions = internalendpoints.Options

EndpointResolverOptions is the service endpoint resolver options

type GetAppMonitorDataAPIClient

type GetAppMonitorDataAPIClient interface {
	GetAppMonitorData(context.Context, *GetAppMonitorDataInput, ...func(*Options)) (*GetAppMonitorDataOutput, error)
}

GetAppMonitorDataAPIClient is a client that implements the GetAppMonitorData operation.

type GetAppMonitorDataInput

type GetAppMonitorDataInput struct {

	// The name of the app monitor that collected the data that you want to retrieve.
	//
	// This member is required.
	Name *string

	// A structure that defines the time range that you want to retrieve results from.
	//
	// This member is required.
	TimeRange *types.TimeRange

	// An array of structures that you can use to filter the results to those that
	// match one or more sets of key-value pairs that you specify.
	Filters []types.QueryFilter

	// The maximum number of results to return in one operation.
	MaxResults int32

	// Use the token returned by the previous operation to request the next page of
	// results.
	NextToken *string
	// contains filtered or unexported fields
}

type GetAppMonitorDataOutput

type GetAppMonitorDataOutput struct {

	// The events that RUM collected that match your request.
	Events []string

	// A token that you can use in a subsequent operation to retrieve the next set of
	// results.
	NextToken *string

	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
	// contains filtered or unexported fields
}

type GetAppMonitorDataPaginator

type GetAppMonitorDataPaginator struct {
	// contains filtered or unexported fields
}

GetAppMonitorDataPaginator is a paginator for GetAppMonitorData

func NewGetAppMonitorDataPaginator

func NewGetAppMonitorDataPaginator(client GetAppMonitorDataAPIClient, params *GetAppMonitorDataInput, optFns ...func(*GetAppMonitorDataPaginatorOptions)) *GetAppMonitorDataPaginator

NewGetAppMonitorDataPaginator returns a new GetAppMonitorDataPaginator

func (*GetAppMonitorDataPaginator) HasMorePages

func (p *GetAppMonitorDataPaginator) HasMorePages() bool

HasMorePages returns a boolean indicating whether more pages are available

func (*GetAppMonitorDataPaginator) NextPage

func (p *GetAppMonitorDataPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*GetAppMonitorDataOutput, error)

NextPage retrieves the next GetAppMonitorData page.

type GetAppMonitorDataPaginatorOptions

type GetAppMonitorDataPaginatorOptions struct {
	// The maximum number of results to return in one operation.
	Limit int32

	// Set to true if pagination should stop if the service returns a pagination token
	// that matches the most recent token provided to the service.
	StopOnDuplicateToken bool
}

GetAppMonitorDataPaginatorOptions is the paginator options for GetAppMonitorData

type GetAppMonitorInput

type GetAppMonitorInput struct {

	// The app monitor to retrieve information for.
	//
	// This member is required.
	Name *string
	// contains filtered or unexported fields
}

type GetAppMonitorOutput

type GetAppMonitorOutput struct {

	// A structure containing all the configuration information for the app monitor.
	AppMonitor *types.AppMonitor

	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
	// contains filtered or unexported fields
}

type HTTPClient

type HTTPClient interface {
	Do(*http.Request) (*http.Response, error)
}

type HTTPSignerV4

type HTTPSignerV4 interface {
	SignHTTP(ctx context.Context, credentials aws.Credentials, r *http.Request, payloadHash string, service string, region string, signingTime time.Time, optFns ...func(*v4.SignerOptions)) error
}

type ListAppMonitorsAPIClient

type ListAppMonitorsAPIClient interface {
	ListAppMonitors(context.Context, *ListAppMonitorsInput, ...func(*Options)) (*ListAppMonitorsOutput, error)
}

ListAppMonitorsAPIClient is a client that implements the ListAppMonitors operation.

type ListAppMonitorsInput

type ListAppMonitorsInput struct {

	// The maximum number of results to return in one operation.
	MaxResults *int32

	// Use the token returned by the previous operation to request the next page of
	// results.
	NextToken *string
	// contains filtered or unexported fields
}

type ListAppMonitorsOutput

type ListAppMonitorsOutput struct {

	// An array of structures that contain information about the returned app monitors.
	AppMonitorSummaries []types.AppMonitorSummary

	// A token that you can use in a subsequent operation to retrieve the next set of
	// results.
	NextToken *string

	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
	// contains filtered or unexported fields
}

type ListAppMonitorsPaginator

type ListAppMonitorsPaginator struct {
	// contains filtered or unexported fields
}

ListAppMonitorsPaginator is a paginator for ListAppMonitors

func NewListAppMonitorsPaginator

func NewListAppMonitorsPaginator(client ListAppMonitorsAPIClient, params *ListAppMonitorsInput, optFns ...func(*ListAppMonitorsPaginatorOptions)) *ListAppMonitorsPaginator

NewListAppMonitorsPaginator returns a new ListAppMonitorsPaginator

func (*ListAppMonitorsPaginator) HasMorePages

func (p *ListAppMonitorsPaginator) HasMorePages() bool

HasMorePages returns a boolean indicating whether more pages are available

func (*ListAppMonitorsPaginator) NextPage

func (p *ListAppMonitorsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListAppMonitorsOutput, error)

NextPage retrieves the next ListAppMonitors page.

type ListAppMonitorsPaginatorOptions

type ListAppMonitorsPaginatorOptions struct {
	// The maximum number of results to return in one operation.
	Limit int32

	// Set to true if pagination should stop if the service returns a pagination token
	// that matches the most recent token provided to the service.
	StopOnDuplicateToken bool
}

ListAppMonitorsPaginatorOptions is the paginator options for ListAppMonitors

type ListTagsForResourceInput

type ListTagsForResourceInput struct {

	// The ARN of the resource that you want to see the tags of.
	//
	// This member is required.
	ResourceArn *string
	// contains filtered or unexported fields
}

type ListTagsForResourceOutput

type ListTagsForResourceOutput struct {

	// The ARN of the resource that you are viewing.
	//
	// This member is required.
	ResourceArn *string

	// The list of tag keys and values associated with the resource you specified.
	//
	// This member is required.
	Tags map[string]string

	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
	// contains filtered or unexported fields
}

type Options

type Options struct {
	// Set of options to modify how an operation is invoked. These apply to all
	// operations invoked for this client. Use functional options on operation call to
	// modify this list for per operation behavior.
	APIOptions []func(*middleware.Stack) error

	// Configures the events that will be sent to the configured logger.
	ClientLogMode aws.ClientLogMode

	// The credentials object to use when signing requests.
	Credentials aws.CredentialsProvider

	// The endpoint options to be used when attempting to resolve an endpoint.
	EndpointOptions EndpointResolverOptions

	// The service endpoint resolver.
	EndpointResolver EndpointResolver

	// Signature Version 4 (SigV4) Signer
	HTTPSignerV4 HTTPSignerV4

	// The logger writer interface to write logging messages to.
	Logger logging.Logger

	// The region to send requests to. (Required)
	Region string

	// Retryer guides how HTTP requests should be retried in case of recoverable
	// failures. When nil the API client will use a default retryer.
	Retryer aws.Retryer

	// The HTTP client to invoke API calls with. Defaults to client's default HTTP
	// implementation if nil.
	HTTPClient HTTPClient
}

func (Options) Copy

func (o Options) Copy() Options

Copy creates a clone where the APIOptions list is deep copied.

type PutRumEventsInput

type PutRumEventsInput struct {

	// A structure that contains information about the app monitor that collected this
	// telemetry information.
	//
	// This member is required.
	AppMonitorDetails *types.AppMonitorDetails

	// A unique identifier for this batch of RUM event data.
	//
	// This member is required.
	BatchId *string

	// The ID of the app monitor that is sending this data.
	//
	// This member is required.
	Id *string

	// An array of structures that contain the telemetry event data.
	//
	// This member is required.
	RumEvents []types.RumEvent

	// A structure that contains information about the user session that this batch of
	// events was collected from.
	//
	// This member is required.
	UserDetails *types.UserDetails
	// contains filtered or unexported fields
}

type PutRumEventsOutput

type PutRumEventsOutput struct {
	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
	// contains filtered or unexported fields
}

type ResolveEndpoint

type ResolveEndpoint struct {
	Resolver EndpointResolver
	Options  EndpointResolverOptions
}

func (*ResolveEndpoint) HandleSerialize

func (*ResolveEndpoint) ID

func (*ResolveEndpoint) ID() string

type TagResourceInput

type TagResourceInput struct {

	// The ARN of the CloudWatch RUM resource that you're adding tags to.
	//
	// This member is required.
	ResourceArn *string

	// The list of key-value pairs to associate with the resource.
	//
	// This member is required.
	Tags map[string]string
	// contains filtered or unexported fields
}

type TagResourceOutput

type TagResourceOutput struct {
	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
	// contains filtered or unexported fields
}

type UntagResourceInput

type UntagResourceInput struct {

	// The ARN of the CloudWatch RUM resource that you're removing tags from.
	//
	// This member is required.
	ResourceArn *string

	// The list of tag keys to remove from the resource.
	//
	// This member is required.
	TagKeys []string
	// contains filtered or unexported fields
}

type UntagResourceOutput

type UntagResourceOutput struct {
	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
	// contains filtered or unexported fields
}

type UpdateAppMonitorInput

type UpdateAppMonitorInput struct {

	// The name of the app monitor to update.
	//
	// This member is required.
	Name *string

	// A structure that contains much of the configuration data for the app monitor. If
	// you are using Amazon Cognito for authorization, you must include this structure
	// in your request, and it must include the ID of the Amazon Cognito identity pool
	// to use for authorization. If you don't include AppMonitorConfiguration, you must
	// set up your own authorization method. For more information, see Authorize your
	// application to send data to Amazon Web Services
	// (https://docs.aws.amazon.com/monitoring/CloudWatch-RUM-get-started-authorization.html).
	AppMonitorConfiguration *types.AppMonitorConfiguration

	// 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.
	CwLogEnabled *bool

	// The top-level internet domain name for which your application has administrative
	// authority.
	Domain *string
	// contains filtered or unexported fields
}

type UpdateAppMonitorOutput

type UpdateAppMonitorOutput struct {
	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
	// contains filtered or unexported fields
}

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL