You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
FlashDuty Real User Monitoring (RUM) provides various advanced configuration options that allow you to modify the collected data and context according to your needs, supporting the following scenarios:
10
+
FlashDuty Real User Monitoring (RUM) offers various advanced configuration options that allow you to modify collected data and context based on your requirements, supporting the following scenarios:
11
11
12
-
-**Protect sensitive data**: Mask sensitive data such as personally identifiable information.
12
+
-**Protect sensitive data**: Mask personally identifiable information and other sensitive data.
13
13
-**Associate user sessions**: Link user sessions with internal user identifiers for support and troubleshooting.
14
-
-**Reduce data volume**: Reduce RUM data collection through sampling to optimize costs.
15
-
-**Enhance context**: Add richer context information to data beyond default attributes.
14
+
-**Reduce data volume**: Lower RUM data collection through sampling to optimize costs.
15
+
-**Enhance context**: Add richer contextual information to data beyond default attributes.
16
16
17
-
The following sections detail how to implement these features.
17
+
The following sections detail how to implement these capabilities.
18
18
19
19
## Override Default RUM View Names
20
20
21
21
The FlashDuty RUM browser SDK automatically generates view events when users visit new pages or when URLs change in single-page applications (SPAs). View names are calculated from the current page URL by default and automatically remove variable IDs (path segments containing numbers). For example, `/dashboard/1234` and `/dashboard/9a` are normalized to `/dashboard/?`.
22
22
23
-
You can manually track view events by setting the `trackViewsManually` option and specify custom names for views as well as associated services and versions.
23
+
You can manually track view events by setting the `trackViewsManually` option and specify custom names for views along with their associated services and versions.
24
24
25
25
### Configure Manual View Tracking
26
26
@@ -37,7 +37,7 @@ flashcatRum.init({
37
37
});
38
38
```
39
39
40
-
After enabling manual tracking, you need to call the `startView` method for each new page or route change (for single-page applications) to start a view. RUM data will begin collecting when the view starts. You can add context to the view and its child events.
40
+
After enabling manual tracking, you need to call the `startView` method on each new page or route change (for single-page applications) to start a view. RUM data will begin collecting when the view starts. You can add context to the view and its child events.
41
41
42
42
#### Parameter Description
43
43
@@ -63,10 +63,10 @@ flashcatRum.startView({
63
63
64
64
### React Router Integration
65
65
66
-
For applications using React Router v6, you can override default view names to match route names defined in your React application with these steps:
66
+
For applications using React Router v6, you can override default view names to match route names defined in your React application through the following steps:
67
67
68
-
1. Set `trackViewsManually` to `true` during initialization (as above).
69
-
2. Start views when routes change using the `useLocation` and `matchRoutes` APIs from `react-router-dom`.
68
+
1. Set `trackViewsManually` to `true` during initialization (as shown above).
69
+
2. Start views on route changes using the `useLocation` and `matchRoutes` APIs from `react-router-dom`.
The FlashDuty RUM browser SDK automatically captures RUM events and populates their main properties. With the `beforeSend` callback function, you can intercept and modify events before they are sent to FlashDuty, supporting the following operations:
122
+
The FlashDuty RUM browser SDK automatically captures RUM events and populates their main attributes. Through the `beforeSend` callback function, you can intercept and modify events before they are sent to FlashDuty, supporting the following operations:
-**Modify events**: Change event content or mask sensitive information.
126
126
-**Discard events**: Selectively discard specific RUM events.
127
127
@@ -144,7 +144,7 @@ Different event types correspond to different contexts:
144
144
145
145
### Enrich RUM Events
146
146
147
-
You can add context properties to events through the `beforeSend` callback. For example, add data from response headers to resource events:
147
+
You can add context attributes to events through the `beforeSend` callback. For example, adding data from response headers to resource events:
148
148
149
149
```javascript
150
150
flashcatRum.init({
@@ -162,7 +162,7 @@ flashcatRum.init({
162
162
});
163
163
```
164
164
165
-
You can also add properties to events through the global context API. Note: Only properties in `event.context` will be recognized by the RUM SDK.
165
+
You can also add attributes to events through the global context API. Note: Only attributes in `event.context` will be recognized by the RUM SDK.
166
166
167
167
### Modify RUM Event Content
168
168
@@ -179,26 +179,26 @@ flashcatRum.init({
179
179
});
180
180
```
181
181
182
-
#### Modifiable Properties
182
+
#### Modifiable Attributes
183
183
184
-
The following properties can be modified through `beforeSend`:
184
+
The following attributes can be modified through `beforeSend`:
185
185
186
186
-**view.url** (string): Current page URL.
187
187
-**view.referrer** (string): Previous page URL.
188
188
-**view.name** (string): Current view name.
189
189
-**view.performance.lcp.resource_url** (string): Resource URL for Largest Contentful Paint (LCP).
190
-
-**service** (string): Service name of the application.
190
+
-**service** (string): Application service name.
191
191
-**version** (string): Application version.
192
-
-**action.target.name** (string): Element involved in user interaction (only for automatically collected actions).
192
+
-**action.target.name** (string): Element involved in user interaction (for automatically collected actions only).
193
193
-**error.message** (string): Error message.
194
194
-**error.stack** (string): Error stack or supplementary information.
195
195
-**error.resource.url** (string): Resource URL that triggered the error.
196
196
-**resource.url** (string): Resource URL.
197
197
-**long_task.scripts.source_url** (string): Script resource URL for long tasks.
198
198
-**long_task.scripts.invoker** (string): Name of the invoking script.
199
-
-**context** (object): Properties added through global context API, view context API, or manually generated events (such as `addError`, `addAction`).
199
+
-**context** (object): Attributes added through global context API, view context API, or manually generated events (such as `addError`, `addAction`).
200
200
201
-
Modifications to other properties will be ignored.
201
+
Modifications to other attributes will be ignored.
202
202
203
203
### Discard RUM Events
204
204
@@ -221,13 +221,13 @@ flashcatRum.init({
221
221
222
222
By adding user information to RUM sessions, you can:
223
223
224
-
- Track specific users' browsing paths.
224
+
- Track browsing paths of specific users.
225
225
- Understand which users are most affected by errors.
226
226
- Monitor performance for key users.
227
227
228
228
### User Attributes
229
229
230
-
The following are optional user attributes, but it is recommended to provide at least one:
230
+
The following are optional user attributes, with at least one recommended:
231
231
232
232
-**usr.id** (string): Unique user identifier.
233
233
-**usr.name** (string): User-friendly name, displayed by default in the RUM UI.
@@ -254,13 +254,13 @@ flashcatRum.setUser({
254
254
constuser=flashcatRum.getUser();
255
255
```
256
256
257
-
#### Add/Override User Properties
257
+
#### Add/Override User Attributes
258
258
259
259
```javascript
260
260
flashcatRum.setUserProperty("name", "John Doe");
261
261
```
262
262
263
-
#### Remove User Properties
263
+
#### Remove User Attributes
264
264
265
265
```javascript
266
266
flashcatRum.removeUserProperty("name");
@@ -274,7 +274,7 @@ flashcatRum.clearUser();
274
274
275
275
**Note**:
276
276
277
-
- After user session information is changed, subsequent RUM events will include the updated information.
277
+
- After user session information changes, subsequent RUM events will include the updated information.
278
278
- After logout (calling `clearUser`), the last view will still retain user information, but subsequent views and session-level data will not.
279
279
280
280
## Sampling
@@ -290,7 +290,7 @@ flashcatRum.init({
290
290
});
291
291
```
292
292
293
-
Sampled-out sessions will not collect any page views or their related telemetry data.
293
+
Sampled sessions will not collect any page views and their related telemetry data.
294
294
295
295
## User Tracking Consent
296
296
@@ -302,7 +302,7 @@ To comply with privacy regulations such as GDPR and CCPA, FlashDuty RUM allows s
302
302
You can change the consent status after initialization using the `setTrackingConsent` API:
303
303
304
304
- Changing from `"granted"` to `"not-granted"`: Stops the RUM session, and data is no longer sent.
305
-
- Changing from `"not-granted"` to `"granted"`: If there is no active session, a new session is created and data collection resumes.
305
+
- Changing from `"not-granted"` to `"granted"`: If there is no active session, a new session will be created and data collection resumes.
306
306
307
307
**Note**: Consent status is not synchronized between tabs or persisted; you need to provide the user's decision during initialization or through `setTrackingConsent`.
308
308
@@ -348,7 +348,7 @@ flashcatRum.setViewContext({
348
348
349
349
## Error Context
350
350
351
-
When capturing errors, you can attach local context to error objects through the `dd_context`property, and the RUM SDK will automatically merge it into the final error event context.
351
+
When capturing errors, you can attach local context to error objects through the `dd_context`attribute, and the RUM SDK will automatically merge it into the final error event context.
352
352
353
353
```javascript
354
354
consterror=newError("Something went wrong");
@@ -360,37 +360,37 @@ throw error;
360
360
361
361
Global context is attached to all RUM events and supports the following operations:
By default, global context and user context are stored in the current page's memory, meaning:
391
+
By default, global context and user context are stored in the current page memory, therefore:
392
392
393
-
- They are not retained after a full page refresh.
393
+
- They are not retained after a complete page refresh.
394
394
- They are not shared between different tabs or windows.
395
395
396
396
Enabling the `storeContextsAcrossPages` option stores context in `localStorage`, supporting:
@@ -413,15 +413,15 @@ flashcatRum.init({
413
413
414
414
- It is not recommended to store personally identifiable information in context, as `localStorage` data exceeds the user session lifecycle.
415
415
- Not compatible with the `trackSessionAcrossSubdomains` option, as `localStorage` is only shared within the same domain.
416
-
-`localStorage` capacity is limited to 5 MiB, so ensure that the total of application data, FlashDuty context, and other third-party data is within this range.
416
+
-`localStorage` capacity is limited to 5 MiB, so ensure that the total of application data, FlashDuty context, and other third-party data remains within this range.
417
417
418
418
## Micro-frontend Support
419
419
420
-
FlashDuty RUM supports micro-frontend architecture by identifying event sources through the stacktrace mechanism. You need to extract `service` and `version`properties from application file paths and filenames.
420
+
FlashDuty RUM supports micro-frontend architecture by identifying event sources through stacktrace mechanism. You need to extract `service` and `version`attributes from application file paths and filenames.
421
421
422
422
### Usage
423
423
424
-
Override `service` and `version`properties in `beforeSend` based on stack information:
424
+
Override `service` and `version`attributes in `beforeSend` based on stack information:
In the RUM browser, you can filter events using the `service`property.
447
+
In the RUM browser, you can filter events using the `service`attribute.
448
448
449
449
### Limitations
450
450
@@ -455,36 +455,36 @@ The following events cannot be attributed to specific sources and therefore do n
455
455
- View events (can be resolved by overriding view names).
456
456
- CORS and CSP violation events.
457
457
458
-
## Connect RUM and Traces
458
+
## Integrate RUM with Distributed Tracing
459
459
460
-
The APM integration with Real User Monitoring allows you to link requests from your web and mobile applications to their corresponding backend traces. This combination enables you to see your full frontend and backend data through one lens.
460
+
Integrating RUM with distributed tracing allows you to correlate requests from your web and mobile applications with their corresponding backend traces. This combination enables you to view complete frontend and backend data at a glance.
461
461
462
-
Use frontend data from RUM, as well as backend, infrastructure, and log information from trace ID injection to pinpoint issues anywhere in your stack and understand what your users are experiencing.
462
+
Use frontend data from RUM along with backend, infrastructure, and log information from trace ID injection to identify issues anywhere in your stack and understand user experience.
463
463
464
464
### Usage
465
465
466
-
Initialize the RUM SDK. Configure the `allowedTracingUrls` initialization parameter with the list of internal, first-party origins called by your browser application.
466
+
Initialize the RUM SDK. Configure the `allowedTracingUrls` initialization parameter with the list of internal first-party origins called by your browser application.
applicationId:"<YOUR_APPLICATION_ID>", // Get from application management page
473
473
clientToken:"<YOUR_CLIENT_TOKEN>", // Get from application management page
474
-
service:"<SERVICE_NAME>", // Service name to distinguish different services
474
+
service:"<SERVICE_NAME>", // Service name for distinguishing different services
475
475
env:"<ENV_NAME>", // Environment identifier
476
476
version:"1.0.0", // Application version
477
477
sessionSampleRate:100, // Sampling rate
478
-
allowedTracingUrls: ["https://api.example.com",/https:\/\/.*\.my-api-domain\.com/, (url) =>url.startsWith("https://api.example.com")], //A list of request URLs used to inject tracing headers.
479
-
traceSampleRate:20// Optional,The percentage of requests to trace: 100 for all, 0 for none. Default value: 100
478
+
allowedTracingUrls: ["https://api.example.com",/https:\/\/.*\.my-api-domain\.com/, (url) =>url.startsWith("https://api.example.com")], //List of URLs that need to be tracked
479
+
traceSampleRate:20// Optional parameter, percentage of requests to trace: 100 for all, 0 for none. Default value: 100
480
480
});
481
481
```
482
482
483
-
allowedTracingUrls matches the full URL (`<scheme>://<host>[:<port>]/<path>[?<query>][#<fragment>]`). It accepts the following types:
483
+
allowedTracingUrls matches the complete URL (`<scheme>://<host>[:<port>]/<path>[?<query>][#<fragment>]`). It accepts the following types:
484
484
485
-
-**String:**matches any URL that starts withthe value, so `https://api.example.com` matches `https://api.example.com/v1/resource`.
486
-
-**RegExp:**executes a testwith the provided RegExp and the URL.
487
-
-**Function:**evaluates withthe URL as parameter. Returning a boolean set to true indicates a match.
485
+
-**String:**Matches any URL that starts withthis value, for example `https://api.example.com` matches `https://api.example.com/v1/resource`.
486
+
-**RegExp:**Uses the regex test() method to check ifthe URL matches.
487
+
-**Function:**Accepts the URL as a parameter and executes the callback function, returning `true` indicates a successful URL match.
488
488
489
489
## Considerations
490
490
@@ -494,4 +494,4 @@ allowedTracingUrls matches the full URL (`<scheme>://<host>[:<port>]/<path>[?<qu
494
494
495
495
## More Information
496
496
497
-
For more detailed information about FlashDuty RUM, visit [FlashDuty SDK](https://github.com/flashcatcloud/browser-sdk).
497
+
For more detailed information about FlashDuty RUM, please visit [FlashDuty SDK](https://github.com/flashcatcloud/browser-sdk).
0 commit comments