diff --git a/src/components/LeftSidebar/SidebarContent.astro b/src/components/LeftSidebar/SidebarContent.astro index 2f173e17..0b162f4f 100644 --- a/src/components/LeftSidebar/SidebarContent.astro +++ b/src/components/LeftSidebar/SidebarContent.astro @@ -30,7 +30,7 @@ const currentPageNoLangNoVer = { sidebarSections.map((section) => ( // (removeSubpageSegment(currentPageMatch).endsWith(removeSubpageSegment(slug)) && 'active') -
  • +
  • **Errors** tab +2. **Use Omnisearch**: select the event **“Error Message”** and enter the specific error message. -## Manually Logging Exceptions +
    + Errors in sessions +
    -The OpenReplay tracker supports logging 3 types of errors: -* Caught Exceptions - [Error](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error) -* Rejected Promises - [PromiseRejectionEvent](https://developer.mozilla.org/en-US/docs/Web/API/PromiseRejectionEvent) -* Error Events (onError) - [ErrorEvent](https://developer.mozilla.org/en-US/docs/Web/API/ErrorEvent) +### Inside a single Session -All of the above can be reported using a single method: +1. Navigate to **Console > Errors Tab** +2. Open the error to view full sourcemaps. +3. Click on **"Find all sessions with this error"** to see the list of sessions where the error occurred. -```js +
    + Session error +
    + +### From the Cards view + +1. Navigate to Cards > Add Card > Monitors +2. Select **Table of Errors** card + +{/*
    + Table of errors +
    */} + +## Manually logging exceptions + +The OpenReplay tracker supports logging three types of errors: + +1. **Caught Exceptions** - [Error](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error) +2. **Rejected Promises** - [PromiseRejectionEvent](https://developer.mozilla.org/en-US/docs/Web/API/PromiseRejectionEvent) +3. **Error Events (onError)** - [ErrorEvent](https://developer.mozilla.org/en-US/docs/Web/API/ErrorEvent) + +All of these can be reported using a single method: + +```javascript tracker.handleError(error, metaObject); // metaObject is optional and is a flat object ``` -Let's review an example for each type of error: +Let’s review examples for each type of error: ### Caught Exceptions (Error) -By default, caught exceptions are not logged to the 'Console' tab. In order to report an error, we can do as following: +By default, caught exceptions are not logged to the ‘Console’ tab. To report an error, use the following pattern: -```js +```javascript try { // application code -} -catch(err) { +} catch (err) { // application code that handles the error - tracker.handleError(error, metaObject); // metaObject is optional and is a flat object + tracker.handleError(err, metaObject); // metaObject is optional and is a flat object } ``` + ### Rejected Promises (PromiseRejectionEvent) -If a Promise is rejected and we want to report the error to OpenReplay, we can do as following: +If a promise is rejected and needs to be reported to OpenReplay, use this approach: -```js +```javascript function myFunc() { doSomeAsyncStuff() - .then((result) => { - // application code - }) - .catch(promiseRejectionErr => { - // application code to handle the error - tracker.handleError(promiseRejectionErr, metaObject); // metaObject is optional and is a flat object - }) + .then((result) => { + // application code + }) + .catch(promiseRejectionErr => { + // application code to handle the error + tracker.handleError(promiseRejectionErr, metaObject); // metaObject is optional and is a flat object + }); } ``` ### onError (ErrorEvent) -This example will show how to report an error in case an `````` element did not load: +Report errors triggered by events, such as an `` element failing to load: -```html +```javascript

    -``` -```js + ``` ## Have questions? diff --git a/src/pages/en/installation/images/error-tracking/errors_session_view.gif b/src/pages/en/installation/images/error-tracking/errors_session_view.gif new file mode 100644 index 00000000..efa89589 Binary files /dev/null and b/src/pages/en/installation/images/error-tracking/errors_session_view.gif differ diff --git a/src/pages/en/installation/images/error-tracking/errors_sessions_view.gif b/src/pages/en/installation/images/error-tracking/errors_sessions_view.gif new file mode 100644 index 00000000..0507e481 Binary files /dev/null and b/src/pages/en/installation/images/error-tracking/errors_sessions_view.gif differ diff --git a/src/pages/en/installation/images/send-metadata/filter_metatdata.gif b/src/pages/en/installation/images/send-metadata/filter_metatdata.gif new file mode 100644 index 00000000..46508303 Binary files /dev/null and b/src/pages/en/installation/images/send-metadata/filter_metatdata.gif differ diff --git a/src/pages/en/installation/images/send-metadata/send_metadata.gif b/src/pages/en/installation/images/send-metadata/send_metadata.gif new file mode 100644 index 00000000..5b0a6ccd Binary files /dev/null and b/src/pages/en/installation/images/send-metadata/send_metadata.gif differ diff --git a/src/pages/en/installation/metadata.mdx b/src/pages/en/installation/metadata.mdx index 53769b88..af818953 100644 --- a/src/pages/en/installation/metadata.mdx +++ b/src/pages/en/installation/metadata.mdx @@ -1,30 +1,42 @@ --- -title: "Metadata" +title: "Send Metadata" metaTitle: "Metadata" metaDescription: "How to pass user metadata to OpenReplay. Also known as traits or user variables in other platforms." --- import Aside from '~/components/Aside.astro' -Additional information about users can be provided with metadata (also known as traits or user variables). They take the form of key/value pairs, and are useful for filtering and searching for specific session replays. +Metadata allows you to add additional information about users to session replays in the form of key-value pairs. This feature enhances your ability to filter and search session recordings, making it easier to identify relevant sessions. Refer to this [tutorial](/tutorials/metadata) for more details on how to send metadata. + +