CloudWatch RUM SDK Requirements

The CloudWatch RUM integration requires the JavaScript SDK version 2.24 or higher, or the React Native SDK version 2.29 or higher.

Overview

This topic explains how to set up and use the LaunchDarkly AWS CloudWatch Real User Monitoring (RUM) integration. With AWS CloudWatch RUM, you can perform real user monitoring to collect and view client-side data about your web application performance from actual user sessions in near real-time.

Read the send custom events CloudWatch documentation for more information on how to enable custom events for your app monitor.

Set up the integration

The code below can be modified to fit your setup.

Here’s how to get started:

Here is an example:

Inspector Setup
1inspectors: [
2 {
3 type: 'flag-used',
4 name: 'cloudwatch-rum',
5 method: (key, detail) => {
6 const flagEvent = {
7 flagKey: key,
8 value: detail.value,
9 }
10 if (detail.variationIndex) {
11 flagEvent['variationIndex'] = detail.variationIndex
12 }
13 if (detail.reason) {
14 flagEvent['reason'] = detail.reason
15 }
16
17 awsRum.recordEvent('com.launchdarkly.flag.evaluation', flagEvent)
18 },
19 },
20]
Built with