Skip to content

Commit

Permalink
fix: Fix hyperlink to MetadataAttributes section (#270)
Browse files Browse the repository at this point in the history
Current hyperlink for `MetadataAttributes` points to editing the doc, instead of viewing. This change fixes the link so that when users click on the link, they will be directed to directly view the doc.
  • Loading branch information
limhjgrace committed Oct 24, 2022
1 parent 3a7a7e8 commit a6e4388
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/cdn_commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ if(awsCreds) awsRum.setAwsCredentials(credentialProvider);
| dispatch | None | `cwr('dispatch');`<br/><br/>`awsRum.dispatch();` | Flush RUM events from the cache and dispatch them to CloudWatch RUM using [`fetch`](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API).
| dispatchBeacon | None | `cwr('dispatchBeacon');`<br/><br/>`awsRum.dispatchBeacon();` | Flush RUM events from the cache and dispatch them to CloudWatch RUM using [`sendBeacon`](https://developer.mozilla.org/en-US/docs/Web/API/Beacon_API).
| enable | None | `cwr('enable');`<br/><br/>`awsRum.enable();` | Start recording and dispatching RUM events.
| addSessionAttributes | [MetadataAttributes](https://github.com/aws-observability/aws-rum-web/edit/main/docs/configuration.md#metadataattributes)| `cwr('addSessionAttributes', { applicationVersion: '1.3.8' });` <br/><br/> `awsRum.addSessionAttributes({ applicationVersion: '1.3.8' });`| Add custom attributes to the metadata of all events in the session.
| addSessionAttributes | [MetadataAttributes](https://github.com/aws-observability/aws-rum-web/blob/main/docs/configuration.md#metadataattributes)| `cwr('addSessionAttributes', { applicationVersion: '1.3.8' });` <br/><br/> `awsRum.addSessionAttributes({ applicationVersion: '1.3.8' });`| Add custom attributes to the metadata of all events in the session.
| recordPageView | String \| [PageView](#pageview) | Record a page view: <br/> `cwr('recordPageView', '/home');`<br/><br/>`awsRum.recordPageView('/home')`<br/><br/> Record a page view with tags: <br/>`cwr('recordPageView', { pageId: '/home', pageTags: ['en', 'landing'] });` <br/><br/> `awsRum.recordPageView({ pageId: '/home', pageTags: ['en', 'landing'] });` <br/><br/> Record a page view with custom metadata attributes: <br/>`cwr('recordPageView', { pageId: '/home', pageAttributes: { pageOrder: 1, template: 'studio' }});` <br/><br/> `awsRum.recordPageView({ pageId: '/home', pageAttributes: { pageOrder: 1, template: 'studio' }});`| Record a page view event.<br/><br/> If you wish to manually record page views instead of using the web client's page view automation, you must disable the automation using the `disableAutoPageView` configuration option, and instrument your application to record page views using the `recordPageView` command.<br/><br/>You can tag pages by setting the `pageTags` property, which is an array of strings. Later, you can use these tags to group pages when aggregating data. <br/><br/>You can add custom attributes to the metadata of all events that occur on this page.
| recordError | Error \|&nbsp;ErrorEvent \|&nbsp;String | `try {...} catch(e) { cwr('recordError', e); }`<br/><br/>`try {...} catch(e) { awsRum.recordError(e); }` | Record a caught error.
| registerDomEvents | Array | `cwr('registerDomEvents', [{ event: 'click', cssLocator: '[label="label1"]' }]);`<br/><br/>`awsRum.registerDomEvent([{ event: 'click', cssLocator: '[label="label1"]' }]);` | Register target DOM events to record. The target DOM events will be added to existing target DOM events. The parameter type is equivalent to the `events` property type of the [interaction telemetry configuration](https://github.com/aws-observability/aws-rum-web/blob/main/docs/cdn_installation.md#interaction).
Expand All @@ -78,4 +78,4 @@ versions of the CloudWatch RUM web client.

The RUM web client also records a set of [default
attributes](https://github.com/aws-observability/aws-rum-web/blob/main/src/event-schemas/meta-data.json).
You cannot overwrite default attributes with custom attributes.
You cannot overwrite default attributes with custom attributes.

0 comments on commit a6e4388

Please sign in to comment.