diff --git a/README.md b/README.md index f1914b24..5b20e151 100644 --- a/README.md +++ b/README.md @@ -65,3 +65,4 @@ date: "2023-12-18T10:00:00+08:00" ``` 完成润色后,可在 VSCode / Cursor 中打开文档,然后在文档 tab 页中右击,点击 `格式化文档`。 + diff --git a/flashduty/en/1. On-call/8. Integrations/8.1 Alerts integration/8.1.52 WecomAlert Integration.md b/flashduty/en/1. On-call/8. Integrations/8.1 Alerts integration/8.1.52 WecomAlert Integration.md new file mode 100644 index 00000000..d3d335be --- /dev/null +++ b/flashduty/en/1. On-call/8. Integrations/8.1 Alerts integration/8.1.52 WecomAlert Integration.md @@ -0,0 +1,81 @@ +--- +title: "Wecom Alert Integration" +description: "Generate a unique Wecom robot address in Flashduty, and synchronize the occurrence and recovery of alerts through Wecom" +date: "2025-05-19T10:00:00+08:00" +url: "https://docs.flashcat.cloud/en/flashduty/Wecom-alert-integration-guide" +--- + +Generate a unique Wecom robot address in Flashduty, and synchronize the occurrence and recovery of alerts through Wecom. + +
+ +## Operation Steps +--- + +### Create Wecom Alert Integration + +You can obtain a Wecom alert integration address through either of these two methods: + +#### Using Dedicated Integration + +Choose this method when you don't need to route alert events to different channels. It's simpler and recommended. + +
+ Expand + + 1. Go to the Flashduty console, select **Channel**, and enter a specific channel's details page + 2. Select the **Integration** tab, click **Add Integration** to enter the integration page + 3. Choose **Wecom Alert** integration and click **Save** to generate a card + 4. Click the generated card to view the **Wecom Alert Integration URL**, copy it for later use, and you're done + +
+ +#### Using Shared Integration + +Choose this method when you need to route alerts to different channels based on the alert event's payload information. + +
+ Expand + + 1. Go to the Flashduty console, select **Integration Center => Alert Events** to enter the integration selection page + 2. Select **Wecom Alert** integration: + - **Integration Name**: Define a name for the current integration + - **Message Type**: Select Wecom alert message type, currently only Text and Markdown are supported + - **Push Mode**: Choose when to trigger or recover alerts for Wecom notifications + 3. Copy the **Wecom Alert Integration URL** for later use + 4. Configure the default route and select the corresponding channel (after integration creation, you can go to `Routes` to configure more routing rules) + 5. Done + +
+
+ +### Customize Wecom Alert Integration + +#### Wecom Alert Integration URL + +The system will generate a unique Wecom alert integration URL for you. This URL is compatible with Wecom robot message protocol. When platforms only support Wecom robot channels, you can use this URL to receive corresponding messages. + +#### Push Mode + +By default, the system always creates new alerts for each message, but you can switch to these modes: + +**Trigger or Close Alert Based on Rules**: In this mode, when receiving a new message, the system matches messages according to your rules and triggers new alerts or closes existing alerts based on the matching results. + + - You need to fill in at least one **trigger** rule + - You must set up regex extraction rules for Alert Key. The system uses this field to find historical alerts for updates or closure. **If regex extraction fails, the system will use the message title to generate an Alert Key** to ensure alerts won't be lost due to configuration errors + - You can choose whether to discard messages when none of the rules match + + Configuration example: + + - Receive all messages, close the alert when the message content contains **RESOLVED**, otherwise trigger a new alert + - Extract Alert Key from message title using the rule **/(.*)/**. + + +### Notes +- Wecom alert integration URL only supports Text and Markdown message types; other message types cannot be received +- Flashduty will generate a default alert title: "Wecom robot Alert , If you need to change the title, you can customize it using the [alert pipeline](https://docs.flashcat.cloud/en/flashduty/alert-pipelines)" + +## Severity Mapping +--- + +Currently, all alerts pushed to Flashduty through the Wecom integration are set to Warning severity. However, you can customize the severity using the [alert pipeline](https://docs.flashcat.cloud/en/flashduty/alert-pipelines). diff --git a/flashduty/en/1. On-call/8. Integrations/8.5 Webhooks/8.5.5 ServiceNow sync.md b/flashduty/en/1. On-call/8. Integrations/8.5 Webhooks/8.5.5 ServiceNow sync.md index 40692534..e49004f6 100644 --- a/flashduty/en/1. On-call/8. Integrations/8.5 Webhooks/8.5.5 ServiceNow sync.md +++ b/flashduty/en/1. On-call/8. Integrations/8.5 Webhooks/8.5.5 ServiceNow sync.md @@ -25,7 +25,7 @@ The user used to access ServiceNow needs to have administrator roles. 1. On the user list page, find the newly created `flashduty` user and go to the configuration page. 2. In the edit page, click `Set Password` to set a password. -3. Click `Roles` to add **admin and itil** roles. +3. Click `Roles` to add **personalize_dictionary and itil** roles (If custom field mapping configuration is not required, the personalize_dictionary permission does not need to be retained). 4. Click `Update` to update the configuration. drawing diff --git a/flashduty/en/2. RUM/2. Applications/2. SDK Integration.md b/flashduty/en/2. RUM/2. Applications/2. SDK Integration.md index 2fdb822f..95f5a321 100644 --- a/flashduty/en/2. RUM/2. Applications/2. SDK Integration.md +++ b/flashduty/en/2. RUM/2. Applications/2. SDK Integration.md @@ -108,35 +108,35 @@ Add the following code snippet to the beginning of the `head` tag in each `HTML` You can check for loading issues with `window.FC_RUM` if the RUM browser SDK fails to load. - - - ## Initialization Parameters -| Configuration | Type | Required | Description | -| -------------------------- | -------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| applicationId | String | Yes | Application ID, obtained from the application management page | -| clientToken | String | Yes | Client Token, obtained from the application management page | -| service | String | Yes | Service name, used to distinguish different services | -| env | String | No | Environment identifier, such as production, staging, etc. | -| version | String | No | Application version | -| trackingConsent | "granted" \| "not-granted" | No | Set initial user tracking consent status. See user tracking consent. Default: `granted` | -| trackViewsManually | Boolean | No | Allows you to control RUM view creation. See override default RUM view names. Default: `false` | -| trackUserInteractions | Boolean | No | Enable automatic collection of user actions. Default: `true` | -| trackResources | Boolean | No | Enable collection of resource events. Default: `true` | -| trackLongTasks | Boolean | No | Enable collection of long task events. Default: `true` | -| trackAnonymousUser | Boolean | No | Enable cross-session collection of anonymous user IDs. Default: `true` | -| enablePrivacyForActionName | Boolean | No | See mask action names. Default: `false` | -| actionNameAttribute | String | No | Specify your own attribute to use for naming actions. Default: `false` | -| sessionSampleRate | Number | No | Percentage of sessions to track: 100 for all, 0 for none. Only tracked sessions send RUM events. Default: `100` | -| silentMultipleInit | Boolean | No | If the RUM browser SDK is already initialized on the page, initialization will silently fail. Default: `false` | -| proxy | String | No | Optional proxy URL, for example: `https://www.proxy.com/path` | -| allowedTracingUrls | Array | No | List of request URLs for injecting tracing headers. For more information, see [Connect RUM and Traces](https://docs.flashcat.cloud/en/flashduty/rum/sdk-integration#Connect%20RUM%20and%20Traces) | -| traceSampleRate | Number | No | Percentage of requests to trace: 100 for all, 0 for none. Default: `100` | -| excludedActivityUrls | Array | No | List of request origins to ignore when calculating page activity | -| compressIntakeRequests | Boolean | No | Compress requests sent to the FlashDuty intake to reduce bandwidth usage when sending large amounts of data. Compression is done in a Worker thread. Default: `false` | -| storeContextsAcrossPages | Boolean | No | Store global context and user context in localStorage to preserve them across user navigation. Default: `false` | -| allowUntrustedEvents | Boolean | No | Allow capturing [untrusted events][https://developer.mozilla.org/en-US/docs/Web/API/Event/isTrusted], for example in automated UI tests. Default: `false` | +| Configuration | Type | Required | Description | +| ----------------------------------- | -------------------------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| applicationId | String | Yes | Application ID, obtained from the application management page | +| clientToken | String | Yes | Client Token, obtained from the application management page | +| service | String | Yes | Service name, used to distinguish different services | +| env | String | No | Environment identifier, such as production, staging, etc. | +| version | String | No | Application version | +| trackingConsent | "granted" \| "not-granted" | No | Set initial user tracking consent status. See user tracking consent. Default: `granted` | +| trackViewsManually | Boolean | No | Allows you to control RUM view creation. See override default RUM view names. Default: `false` | +| trackUserInteractions | Boolean | No | Enable automatic collection of user actions. Default: `true` | +| trackResources | Boolean | No | Enable collection of resource events. Default: `true` | +| trackLongTasks | Boolean | No | Enable collection of long task events. Default: `true` | +| trackAnonymousUser | Boolean | No | Enable cross-session collection of anonymous user IDs. Default: `true` | +| enablePrivacyForActionName | Boolean | No | See mask action names. Default: `false` | +| actionNameAttribute | String | No | Specify your own attribute to use for naming actions. Default: `false` | +| sessionSampleRate | Number | No | Percentage of sessions to track: 100 for all, 0 for none. Only tracked sessions send RUM events. Default: `100` | +| sessionReplaySampleRate | Number | No | Percentage of tracked sessions to enable [session replay](https://docs.flashcat.cloud/en/flashduty/rum/session-replay) functionality: 100 for all, 0 for none. Default: `0` | +| sessionReplayPrivacyLevel | String | No | Privacy policy for session replay data collection. 'allow' collects all data except passwords, 'mask-user-input' hides user input field content, 'mask-all' hides all text information. Default: `'mask-user-input'` | +| startSessionReplayRecordingManually | Boolean | No | Whether to manually enable session replay recording switch | +| silentMultipleInit | Boolean | No | If the RUM browser SDK is already initialized on the page, initialization will silently fail. Default: `false` | +| proxy | String | No | Optional proxy URL, for example: `https://www.proxy.com/path` | +| allowedTracingUrls | Array | No | List of request URLs for injecting tracing headers. For more information, see [Connect RUM and Traces](https://docs.flashcat.cloud/en/flashduty/rum/advanced-configuration#connect-rum-and-distributed-tracing) | +| traceSampleRate | Number | No | Percentage of requests to trace: 100 for all, 0 for none. Default: `100` | +| excludedActivityUrls | Array | No | List of request origins to ignore when calculating page activity | +| compressIntakeRequests | Boolean | No | Compress requests sent to the FlashDuty intake to reduce bandwidth usage when sending large amounts of data. Compression is done in a Worker thread. Default: `false` | +| storeContextsAcrossPages | Boolean | No | Store global context and user context in localStorage to preserve them across user navigation. Default: `false` | +| allowUntrustedEvents | Boolean | No | Allow capturing [untrusted events](https://developer.mozilla.org/en-US/docs/Web/API/Event/isTrusted), for example in automated UI tests. Default: `false` | ## Use Cases @@ -209,4 +209,4 @@ After integration, you can validate whether the integration was successful throu - [RUM Application Management](https://docs.flashcat.cloud/en/flashduty/rum/application-management?nav=01JCQ7A4N4WRWNXW8EWEHXCMF5): Learn how to create and manage RUM applications - [RUM SDK Advanced Configuration](https://docs.flashcat.cloud/en/flashduty/rum/advanced-configuration?nav=01JCQ7A4N4WRWNXW8EWEHXCMF5): Learn how to configure advanced features of the SDK -- [RUM Analysis Dashboard](https://docs.flashcat.cloud/en/flashduty/rum/analysis-dashboard?nav=01JCQ7A4N4WRWNXW8EWEHXCMF5): View and analyze RUM data \ No newline at end of file +- [RUM Analysis Dashboard](https://docs.flashcat.cloud/en/flashduty/rum/analysis-dashboard?nav=01JCQ7A4N4WRWNXW8EWEHXCMF5): View and analyze RUM data diff --git a/flashduty/en/2. RUM/5. Session Replay/1. Overview.md b/flashduty/en/2. RUM/5. Session Replay/1. Overview.md new file mode 100644 index 00000000..a169db90 --- /dev/null +++ b/flashduty/en/2. RUM/5. Session Replay/1. Overview.md @@ -0,0 +1,78 @@ +--- +title: "RUM Session Replay Overview" +description: "Master Flashduty RUM's session replay functionality to quickly identify issues and optimize user experience by reproducing user operation paths." +date: "2024-05-09T10:00:00+08:00" +url: "https://docs.flashcat.cloud/en/flashduty/rum/session-replay" +--- + +## Overview + +Flashduty RUM's **Session Replay** feature is a powerful user behavior analysis tool designed to help developers understand user experience and quickly identify root causes by reproducing user operation paths in websites or applications, combined with RUM performance and error tracking data. + +## Core Features + +1. **User Operation Recording**: Automatically records user actions such as mouse clicks, page scrolling, form inputs, navigation behaviors, etc., generating intuitive session replay videos. +2. **Error Correlation**: Combines session replay with error tracking, automatically correlating user operations and page states when errors occur, helping to quickly identify problem trigger scenarios. +3. **Interaction Analysis**: Provides user interaction timeline, displaying user operation sequences, page loading times, and occurrence points of key events (such as errors or network request failures). +4. **Privacy Protection**: Offers flexible privacy configurations to mask sensitive information (such as form input content) or limit recording scope, ensuring data compliance. + +## Value and Benefits + +1. **Intuitive Problem Identification**: Quickly understand specific operation paths when users encounter issues through visual replay, reducing troubleshooting time. +2. **Enhanced User Experience**: Gain insights into user behavior patterns, discover interaction pain points, and optimize page design and functional logic. +3. **Data-Driven Optimization**: Combine error data and user behavior analysis to provide reliable data support for product iterations. + +## Use Cases + +1. **Problem Reproduction**: Reproduce operation scenarios when errors occur by replaying user sessions, quickly identifying problem root causes. +2. **User Behavior Analysis**: Analyze user behavior on key pages (such as payment, registration) to optimize user experience and conversion rates. +3. **Debugging and Optimization**: Combine error tracking to identify issues like slow page loading and interaction lag, optimizing frontend performance. +4. **Customer Support**: Quickly understand user-reported issues by replaying user sessions, providing more precise support. + +## Session Replay Process + +Flashduty RUM's session replay functionality is divided into two key phases: **Behavior Recording and Replay**, **Problem Analysis and Optimization**. + +### 1. Behavior Recording and Replay + +Quickly recording user behavior and generating replays is the first step in analysis. During the recording phase, the recording SDK takes snapshots of the current DOM and CSS styles, and collects corresponding events when user behaviors occur (DOM changes, mouse movements, clicks, form inputs, etc.). Data is reported after serialization, compression, and removal of sensitive information. + +### 2. Problem Analysis and Optimization + +Flashduty RUM provides rich behavior data and analysis tools to help identify problems and optimize experience: + +#### Core Behavior Data + +- **User Interactions**: Timeline of operations such as clicks, scrolling, input, navigation, etc. +- **Page Performance**: Page loading times, resource loading failures, API call delays, etc. +- **Error Context**: Page state, DOM structure, and user operations when errors occur. + +#### Context Information + +- **User Environment**: Browser, device, operating system, network conditions. +- **Operation Path**: Complete operation sequence of users during the session. +- **Page Snapshots**: Page DOM snapshots when errors occur. + +Through Flashduty RUM's visual replay tools, you can quickly analyze the correlation between user behavior and problems: + +| Problem Type | Typical Manifestation | Possible Causes | Identification Method | +| --------------------------- | ---------------------------------- | ------------------------------------------- | ------------------------------------- | +| **Slow Page Loading** | Page white screen, loading timeout | Resource loading failure, network delay | Check for resource loading exceptions | +| **Function Failure** | Button clicks unresponsive | Code logic errors, event binding issues | View specific behavior and exceptions | +| **Form Submission Failure** | Data not saved, submission failure | API response errors, form validation issues | View error and exception details | + +## Problem Analysis Tools + +#### 1. Session Replay Panel + +In the player, you can view all user operations including clicks, scrolling, and inputs, supporting playback controls such as fast-forward, replay, and seek, helping developers intuitively reproduce problem scenarios and precisely analyze user behavior. + +#### 2. Event and Context Correlation + +Session replay supports correlation with various events (such as view loading, errors, user behavior), allowing detailed viewing of errors and attributes (context information such as device type, browser version, geographic location, etc.), facilitating root cause identification and in-depth analysis. + +## Next Steps + +- [SDK Configuration](https://docs.flashcat.cloud/en/flashduty/rum/session-replay-config) +- [View Session Replay](https://docs.flashcat.cloud/en/flashduty/rum/session-replay-explorer) +- [Privacy Protection Settings](https://docs.flashcat.cloud/en/flashduty/rum/privacy-settings) diff --git a/flashduty/en/2. RUM/5. Session Replay/2. SDK Configuration.md b/flashduty/en/2. RUM/5. Session Replay/2. SDK Configuration.md new file mode 100644 index 00000000..644c9d3e --- /dev/null +++ b/flashduty/en/2. RUM/5. Session Replay/2. SDK Configuration.md @@ -0,0 +1,92 @@ +--- +title: "RUM Session Replay SDK Configuration" +description: "Master Flashduty RUM's session replay functionality to quickly identify issues and optimize user experience by reproducing user operation paths." +date: "2024-05-09T10:00:00+08:00" +url: "https://docs.flashcat.cloud/en/flashduty/rum/session-replay-config" +--- + +## Overview + +Flashduty RUM's session replay functionality is integrated into the RUM SDK. By simply configuring sampling rates and privacy rules, you can quickly enable replay functionality. + +## Enable Collection + +### Automatic Collection + +The replay SDK is already integrated into the RUM SDK. Configure the sampling rate to enable replay functionality. + +```js +window.FC_RUM.init({ + applicationId: "YOUR_APPLICATION_ID", + clientToken: "YOUR_CLIENT_TOKEN", + // ... + sessionReplaySampleRate: 10, // Default session replay sampling rate 10% + // ... +}); +``` + +::: tip +Sampling Method: When the client SDK initializes a session, it generates a random number between 0-1 and compares it with `rate/100`. If it falls within the range, that session will be collected as a sample, and replay data will be collected and reported within the session cycle. + +Based on sampled session, the session will be +Based on the session being sampled, the session replay sampling rate (`sessionReplaySampleRate`) will be applied for a second round of calculation and sampling. +::: + +By default, after configuring the sampling rate, automatic collection will be enabled after `RUM.init()` is executed. If you want to manually control the collection timing (such as collecting data after user login), you can first enable the manual collection switch, then manually call the record method. + +```js +window.FC_RUM.init({ + applicationId: "YOUR_APPLICATION_ID", + clientToken: "YOUR_CLIENT_TOKEN", + // ... + sessionReplaySampleRate: 10, // 10% sampling rate + startSessionReplayRecordingManually: true, // Enable manual collection switch + // ... +}); + +if (userIsShouldRecord()) { + // If certain conditions are met, replay can be enabled + window.FC_RUM.startSessionReplayRecording(); // Enable data collection when called +} +``` + +After enabling collection, you can stop collection using the `stopSessionReplayRecording()` method. + +### Force Enable + +In certain scenarios, even if the sampling rate is not hit, you may still want to collect data for that session (such as monitoring newly launched features, or capturing subsequent operations after an exception), you can force enable replay by calling the `startSessionReplayRecording({ force: true })` method. + +::: warning +Note: Force enable will only take effect when the current session is sampled but sessionReplay is not sampled. If the session itself is not sampled, even forcing replay enable will be ineffective. +::: + +## Disable Collection + +If you need to disable the collection functionality, adjust the corresponding replay sampling rate to 0 or simply remove the configuration item. + +```js +window.FC_RUM.init({ + applicationId: "YOUR_APPLICATION_ID", + clientToken: "YOUR_CLIENT_TOKEN", + // ... + sessionReplaySampleRate: 0, // Disable replay functionality + // ... +}); +``` + +## How It Works + +The session replay SDK is implemented based on [rrweb](https://www.rrweb.io/). + +During the recording phase, the recording SDK takes snapshots of the current DOM and CSS styles, and collects corresponding events when user behaviors occur (DOM changes, mouse movements, clicks, form inputs, etc.). Data is reported after serialization, compression, and removal of sensitive information. + +During the replay phase, the playback SDK reconstructs the DOM based on snapshots and converts event behaviors to DOM changes for display at appropriate times. + +Before data reporting, the SDK performs data compression in advance and executes this CPU-intensive operation in a web worker, which does not affect main thread rendering. + +The SDK compatibility is consistent with the RUM SDK, supporting browsers above IE11. + +## Next Steps + +- [View Session Replays](https://docs.flashcat.cloud/zh/flashduty/rum/session-replay-explorer) +- [Learn About Privacy Protection Settings](https://docs.flashcat.cloud/zh/flashduty/rum/privacy-settings) diff --git a/flashduty/en/2. RUM/5. Session Replay/3. View Session Replay.md b/flashduty/en/2. RUM/5. Session Replay/3. View Session Replay.md new file mode 100644 index 00000000..2143b06e --- /dev/null +++ b/flashduty/en/2. RUM/5. Session Replay/3. View Session Replay.md @@ -0,0 +1,54 @@ +--- +title: "View RUM Session Replay Records" +description: "Master Flashduty RUM's session replay functionality to quickly identify issues and optimize user experience by reproducing user operation paths." +date: "2024-05-09T10:00:00+08:00" +url: "https://docs.flashcat.cloud/en/flashduty/rum/session-replay-explorer" +--- + +## Overview + +Flashduty RUM's session replay functionality helps developers quickly identify problems, analyze user behavior, and optimize product experience by intuitively reproducing user operation paths. Integrated into the RUM SDK, it can be enabled with simple configuration and supports flexible sampling strategies and privacy rule settings. Session replay provides powerful player and Devtools functionality, including operation timelines, error analysis, and context information viewing, helping developers efficiently troubleshoot issues and gain deep insights into user interaction details. + +## Session List + +In the "Session Replay" menu, you can view recent session records, sorted by time in descending order by default. It supports sorting by fields such as session duration, view count, behavior count, error count, etc., and provides rich filtering conditions (such as time range, page, tags, etc.) for quickly locating target replay records. + +Click on any record item to open the player panel, divided into the following areas: + +- **Information Display Area**: Shows session context information such as access time, start and end pages, tags, etc. +- **Playback Area**: Reproduces operation paths from the user's perspective, clearly displaying user interaction details. +- **Playback Control Area**: Provides playback control functions for convenient operation. + +![Session Replay Panel](https://docs-cdn.flashcat.cloud/imges/png/e68c92a399e22e58ffdde318950e1c54.png) + +:::tip +For quick browsing, only replays with a duration **greater than 3 seconds** are displayed in the list +::: + +## Player + +The player supports functions such as play, pause, fast-forward, rewind, replay, speed control, fullscreen, and seek, and supports keyboard shortcuts to improve efficiency. During playback, the timeline will mark user behaviors (Action) and errors (Error) with different colored icons, making it easy to quickly overview key events in the session. +![Player Interface](https://docs-cdn.flashcat.cloud/imges/png/c43b87b7764c5b0a136b0d721eb538cf.png) + +By default, the player will automatically skip inactive segments to improve viewing efficiency. You can also disable this function through configuration to play completely according to the actual timeline. +![Inactive Segment Configuration](https://docs-cdn.flashcat.cloud/imges/png/d85cc4b187530c8d27b9782ff545e26a.png) + +## Devtools + +Through the "View All Events and Errors" function, you can enter wide-screen mode to view the session's operation timeline and detailed analysis. Devtools includes the following functions: + +- **Events Tab**: Displays all user operations in the session, supporting the following functions: + + - Switch between relative time and absolute time display. + - Filter by event type (such as clicks, page navigation, etc.). + - Click on specific events, and the player will automatically jump to the corresponding timestamp. + +![Event Timeline](https://docs-cdn.flashcat.cloud/imges/png/e903b09dd88de3837e9c88959181dba9.png) + +- **Error Tab**: Lists all errors and issues in the session, supporting click-to-jump to detailed error information for quick identification and analysis. + +- **Attributes Tab**: Displays session context information (such as device, browser, geographic location, etc.), helping developers gain deep insights into problem background and perform precise identification. + +## Next Steps + +- [Learn About Privacy Protection Settings](https://docs.flashcat.cloud/zh/flashduty/rum/privacy-settings) diff --git a/flashduty/en/2. RUM/5. Session Replay/4. Privacy Protection.md b/flashduty/en/2. RUM/5. Session Replay/4. Privacy Protection.md new file mode 100644 index 00000000..a6e71557 --- /dev/null +++ b/flashduty/en/2. RUM/5. Session Replay/4. Privacy Protection.md @@ -0,0 +1,68 @@ +--- +title: "RUM Session Replay Privacy Protection" +description: "Master Flashduty RUM's session replay functionality to quickly identify issues and optimize user experience by reproducing user operation paths." +date: "2024-05-09T10:00:00+08:00" +url: "https://docs.flashcat.cloud/en/flashduty/rum/session-replay-privacy" +--- + +## Overview + +To meet privacy requirements in different scenarios, the session replay functionality has built-in flexible privacy protection strategies. By configuring the `defaultPrivacyLevel` field, developers can control the sensitivity of data collection, supporting multiple modes from displaying all text (except passwords) to completely hiding page text, ensuring user data security and compliance. + +## Privacy Strategies + +The session replay functionality provides flexible privacy protection configuration through the `defaultPrivacyLevel` field, ensuring both functionality and data security when collecting user operation data. Below are three main privacy level configurations and their effects: +:::tip +Input fields with type "password" are sensitive information and will not be collected in any scenario. +::: + +### Hide All Page Text + +Configure `defaultPrivacyLevel: "mask-all"` to completely hide all text content on the page, preserving only operation behaviors and page structure, suitable for scenarios with extremely high data privacy requirements. + +```js +window.FC_RUM.init({ + applicationId: "YOUR_APPLICATION_ID", + clientToken: "YOUR_CLIENT_TOKEN", + // ... + sessionReplaySampleRate: 10, // Default sampling rate 10% + defaultPrivacyLevel: "mask", + // ... +}); +``` + +![Hide All Page Text](https://docs-cdn.flashcat.cloud/imges/png/03afebc34026be5cb5ad683665163c12.png) + +### Hide Input Field Content + +Configure `defaultPrivacyLevel: "mask-user-input"` to hide content in user input fields (such as text inputs, select boxes, etc.) while preserving other page text, suitable for scenarios requiring protection of user input privacy. + +```js +window.FC_RUM.init({ + applicationId: "YOUR_APPLICATION_ID", + clientToken: "YOUR_CLIENT_TOKEN", + // ... + sessionReplaySampleRate: 10, // Default sampling rate 10% + defaultPrivacyLevel: "mask-user-input", + // ... +}); +``` + +![Hide Input Field Content](https://docs-cdn.flashcat.cloud/imges/png/e2f36a765e0dcb5db8a3ba9c24c42d6a.png) + +### Display All Text (Except Passwords) + +Configure `defaultPrivacyLevel: "allow"` to allow collection of all text content on the page except password fields, suitable for scenarios requiring complete user interaction details. + +```js +window.FC_RUM.init({ + applicationId: "YOUR_APPLICATION_ID", + clientToken: "YOUR_CLIENT_TOKEN", + // ... + sessionReplaySampleRate: 10, // Default sampling rate 10% + defaultPrivacyLevel: "allow", + // ... +}); +``` + +![Display All Text](https://docs-cdn.flashcat.cloud/imges/png/24db39145913b960a588e45ab088c224.png) diff --git a/flashduty/en/2. RUM/5. Others/1. Terminology.md b/flashduty/en/2. RUM/6. Others/1. Terminology.md similarity index 100% rename from flashduty/en/2. RUM/5. Others/1. Terminology.md rename to flashduty/en/2. RUM/6. Others/1. Terminology.md diff --git a/flashduty/en/2. RUM/5. Others/2. Data Collection.md b/flashduty/en/2. RUM/6. Others/2. Data Collection.md similarity index 100% rename from flashduty/en/2. RUM/5. Others/2. Data Collection.md rename to flashduty/en/2. RUM/6. Others/2. Data Collection.md diff --git a/flashduty/en/2. RUM/5. Others/4. Data Security.md b/flashduty/en/2. RUM/6. Others/4. Data Security.md similarity index 100% rename from flashduty/en/2. RUM/5. Others/4. Data Security.md rename to flashduty/en/2. RUM/6. Others/4. Data Security.md diff --git "a/flashduty/zh/1. On-call/5. \351\233\206\346\210\220\345\274\225\345\257\274/8.1 \345\221\212\350\255\246\351\233\206\346\210\220/8.1.0 \346\240\207\345\207\206\345\221\212\350\255\246\344\272\213\344\273\266\351\233\206\346\210\220\346\214\207\345\274\225.md" "b/flashduty/zh/1. On-call/5. \351\233\206\346\210\220\345\274\225\345\257\274/8.1 \345\221\212\350\255\246\351\233\206\346\210\220/8.1.0 \346\240\207\345\207\206\345\221\212\350\255\246\344\272\213\344\273\266\351\233\206\346\210\220\346\214\207\345\274\225.md" index f5b19296..6b91777b 100644 --- "a/flashduty/zh/1. On-call/5. \351\233\206\346\210\220\345\274\225\345\257\274/8.1 \345\221\212\350\255\246\351\233\206\346\210\220/8.1.0 \346\240\207\345\207\206\345\221\212\350\255\246\344\272\213\344\273\266\351\233\206\346\210\220\346\214\207\345\274\225.md" +++ "b/flashduty/zh/1. On-call/5. \351\233\206\346\210\220\345\274\225\345\257\274/8.1 \345\221\212\350\255\246\351\233\206\346\210\220/8.1.0 \346\240\207\345\207\206\345\221\212\350\255\246\344\272\213\344\273\266\351\233\206\346\210\220\346\214\207\345\274\225.md" @@ -8,7 +8,7 @@ url: "https://docs.flashcat.cloud/zh/flashduty/custom-alert-integration-guide" 通过标准协议推送自有系统告警事件到 Flashduty,实现告警事件自动化降噪处理。 :::tips -Flashduty 已经适配了大部分常用告警系统的 webhook 协议,对于这些系统您应该首先使用对应的集成,更加简单方便。本集成提供了一个标准的 HTTP 接口,需要允许您开发适配。好处是您可以推送任何你想进行oncall的告警事件。 +Flashduty 已经适配了大部分常用告警系统的 webhook 协议,对于这些系统您应该首先使用对应的集成,更加简单方便。本集成提供了一个标准的 HTTP 接口,需要您开发适配。好处是您可以推送任何你想进行oncall的告警事件。 :::
diff --git "a/flashduty/zh/1. On-call/5. \351\233\206\346\210\220\345\274\225\345\257\274/8.1 \345\221\212\350\255\246\351\233\206\346\210\220/8.1.52 \344\274\201\345\276\256\345\221\212\350\255\246\351\233\206\346\210\220\346\214\207\345\274\225.md" "b/flashduty/zh/1. On-call/5. \351\233\206\346\210\220\345\274\225\345\257\274/8.1 \345\221\212\350\255\246\351\233\206\346\210\220/8.1.52 \344\274\201\345\276\256\345\221\212\350\255\246\351\233\206\346\210\220\346\214\207\345\274\225.md" new file mode 100644 index 00000000..f2494950 --- /dev/null +++ "b/flashduty/zh/1. On-call/5. \351\233\206\346\210\220\345\274\225\345\257\274/8.1 \345\221\212\350\255\246\351\233\206\346\210\220/8.1.52 \344\274\201\345\276\256\345\221\212\350\255\246\351\233\206\346\210\220\346\214\207\345\274\225.md" @@ -0,0 +1,82 @@ +--- +title: "企微告警集成" +description: "在 Flashduty 生成唯一的企微机器人地址,通过企微的方式将告警的发生与恢复同步到 Flashduty" +date: "2025-05-19T10:00:00+08:00" +url: "https://docs.flashcat.cloud/zh/flashduty/wecom-alert-integration-guide" +--- + +在 Flashduty 生成唯一的企微机器人告警地址,通过企微机器人告警地址将告警的发生与恢复同步到 Flashduty。 + +
+ +## 操作步骤 +--- + +### 创建企微告警集成 + +您可通过以下2种方式,获取一个企微机器人告警集成地址,任选其一即可。 + +#### 使用专属集成 + +当您不需要将告警事件路由到不同的协作空间,优先选择此方式,更简单。 + +
+ 展开 + + 1. 进入 Flashduty 控制台,选择 **协作空间**,进入某个空间的详情页面 + 2. 选择 **集成数据** tab,点击 **添加一个集成**,进入添加集成页面 + 3. 选择 **企微告警** 集成,点击 **保存**,生成卡片。 + 4. 点击生成的卡片,可以查看到 **企微告警集成地址**,复制备用,完成。 + +
+ +#### 使用共享集成 + +当您需要根据告警事件的 Payload 信息,将告警路由到不同的协作空间,优先选择此方式。 + +
+ 展开 + + 1. 进入 Flashduty 控制台,选择 **集成中心=>告警事件**,进入集成选择页面。 + 2. 选择 **企微告警** 集成: + - **集成名称**:为当前集成定义一个名称。 + - **消息类型**:选择企微告警消息类型,目前仅支持 Text、Markdown。 + - **推送模式**:选择企微告警在何种情况下触发或恢复告警。 + 3. 复制当前页面的 **企微告警集成地址** 备用。 + 4. 配置默认路由,并选择对应的协作空间(集成创建后可以前往 `路由` 进行更多路由规则的配置)。 + 5. 完成。 + +
+
+ +### 定制企微告警集成 + +#### 企微告警集成地址 + +系统会帮您生成一个唯一的企微告警集成地址,该地址兼容企微机器人消息的协议,在有的平台仅支持企微机器人通道时,您可以使用该地址来接收对应的消息。 + +#### 推送模式 + +默认系统总是为每一条消息创建新的告警,但您可以切换模式为: + +**根据规则触发或关闭告警**:该模式下,每当接收到新消息,系统会根据您的规则进行消息匹配,匹配到的消息按照规则去触发新告警或关闭已有告警。 + + - 您至少需要填写一条**触发**规则; + - 您必须设置 Alert Key 的正则提取规则。系统使用该字段来查找历史告警,以便对其进行更新或关闭;**如果正则提取失败,系统将使用消息标题来生成 Alert Key**,以确保告警不会因为配置错误而丢失; + - 您可以选择,当所有的规则都不匹配时,是否丢弃消息。 + + 配置示例: + + - 接收所有消息,当消息内容中包含 **RESOVED** 字样时,关闭告警,否则触发新告警; + - Alert Key 从消息标题中提取,规则为 **/(.\*)/**。 + + +### 注意事项 +- 企微告警集成地址仅支持接收 Text、Markdown 消息类型,其他消息无法接收。 +- Flashduty 会生成默认告警标题: “企微机器人告警”,如果您需要更改标题,可以通过[告警处理 Pipeline](https://docs.flashcat.cloud/zh/flashduty/alert-pipelines) 来自定义标题。 + +## 严重程度映射关系 +--- + +当前企微告警集成推送到 Flashduty 的严重程度均为Warning,但您可以通过[告警处理 Pipeline](https://docs.flashcat.cloud/zh/flashduty/alert-pipelines) 来自定义严重程度。 + diff --git "a/flashduty/zh/1. On-call/5. \351\233\206\346\210\220\345\274\225\345\257\274/8.5 Webhooks/8.5.5 ServiceNow \345\220\214\346\255\245.md" "b/flashduty/zh/1. On-call/5. \351\233\206\346\210\220\345\274\225\345\257\274/8.5 Webhooks/8.5.5 ServiceNow \345\220\214\346\255\245.md" index 29f42f94..66df08ca 100644 --- "a/flashduty/zh/1. On-call/5. \351\233\206\346\210\220\345\274\225\345\257\274/8.5 Webhooks/8.5.5 ServiceNow \345\220\214\346\255\245.md" +++ "b/flashduty/zh/1. On-call/5. \351\233\206\346\210\220\345\274\225\345\257\274/8.5 Webhooks/8.5.5 ServiceNow \345\220\214\346\255\245.md" @@ -25,7 +25,7 @@ url: "https://docs.flashcat.cloud/zh/flashduty/service-now-sync" 1. 在用户列表页面,找到新创建的 `flashduty` 用户并进到配置页面。 2. 在编辑页面中,点击 `Set Password` 设置一个密码。 -3. 点击 `Roles` 添加 **admin 和 itil** 角色。 +3. 点击 `Roles` 添加 **personalize_dictionary 和 itil** 角色(如果不需要配置自定义字段映射关系,可以不授予 personalize_dictionary 权限)。 4. 点击 `Update` 更新配置。 drawing diff --git "a/flashduty/zh/2. RUM/1. \345\277\253\351\200\237\345\274\200\345\247\213/3. \345\270\270\350\247\201\351\227\256\351\242\230.md" "b/flashduty/zh/2. RUM/1. \345\277\253\351\200\237\345\274\200\345\247\213/3. \345\270\270\350\247\201\351\227\256\351\242\230.md" index 64f0a98c..47e5c581 100644 --- "a/flashduty/zh/2. RUM/1. \345\277\253\351\200\237\345\274\200\345\247\213/3. \345\270\270\350\247\201\351\227\256\351\242\230.md" +++ "b/flashduty/zh/2. RUM/1. \345\277\253\351\200\237\345\274\200\345\247\213/3. \345\270\270\350\247\201\351\227\256\351\242\230.md" @@ -35,7 +35,7 @@ url: "https://docs.flashcat.cloud/zh/flashduty/rum/frequently-asked-questions" service: "", env: "", version: "1.0.0", - sessionSampleRate: 100, + sessionSampleRate: 10, // 会话采样率10% }); ``` @@ -392,4 +392,4 @@ A:可以通过以下方式: 3. 排除特定页面 4. 配置数据脱敏 -通过遵循本指南的排查步骤,您可以确保 Flashduty RUM 正常运行,为您提供准确的用户体验监控数据。 \ No newline at end of file +通过遵循本指南的排查步骤,您可以确保 Flashduty RUM 正常运行,为您提供准确的用户体验监控数据。 diff --git "a/flashduty/zh/2. RUM/2. \345\272\224\347\224\250\347\256\241\347\220\206/2. SDK\346\216\245\345\205\245.md" "b/flashduty/zh/2. RUM/2. \345\272\224\347\224\250\347\256\241\347\220\206/2. SDK\346\216\245\345\205\245.md" index 7307faf2..e680f2a0 100644 --- "a/flashduty/zh/2. RUM/2. \345\272\224\347\224\250\347\256\241\347\220\206/2. SDK\346\216\245\345\205\245.md" +++ "b/flashduty/zh/2. RUM/2. \345\272\224\347\224\250\347\256\241\347\220\206/2. SDK\346\216\245\345\205\245.md" @@ -108,34 +108,35 @@ flashcatRum.init({ 您可以用`window.FC_RUM`检查 RUM 浏览器 SDK 发生加载失败时出现的问题。 - - ## 初始化参数 -| 配置项 | 类型 | 必填 | 必填 | 说明 | -| -------------------------- | -------------------------- | ---- | -------------------------------------------------------------------------------------------------------------- | ---- | -| applicationId | String | 是 | 应用 ID,在应用管理页面获取 | -| clientToken | String | 是 | 客户端 Token,在应用管理页面获取 | -| service | String | 是 | 服务名称,用于区分不同的服务 | -| env | String | 否 | 环境标识,如 production、staging 等 | -| version | String | 否 | 应用版本号 | -| trackingConsent | "granted" \| "not-granted" | 否 | 设置初始用户跟踪同意状态。请参阅用户跟踪同意。默认值:`granted` | -| trackViewsManually | Boolean | 否 | 允许您控制 RUM 视图的创建。请参阅覆盖默认 RUM 视图名称。默认值:`false` | -| trackUserInteractions | Boolean | 否 | 启用自动收集用户操作。默认值:`true` | -| trackResources | Boolean | 否 | 启用资源事件的收集。默认值:`true` | -| trackLongTasks | Boolean | 否 | 启用长任务事件的收集。默认值:`true` | -| trackAnonymousUser | Boolean | 否 | 启用跨会话收集匿名用户 ID。默认值:`true` | -| enablePrivacyForActionName | Boolean | 否 | 请参见掩码操作名称。默认值:`false` | -| actionNameAttribute | String | 否 | 指定您自己的属性以用于命名操作。`false` | -| sessionSampleRate | Number | 否 | 要跟踪的会话百分比:100 为所有,0 为无。仅跟踪的会话发送 RUM 事件。默认值:`100` | -| silentMultipleInit | Boolean | 否 | 如果 RUM 浏览器 SDK 已在页面上初始化,则初始化会静默失败。默认值:`false` | -| proxy | String | 否 | 可选代理 URL,例如:`https://www.proxy.com/path` | -| allowedTracingUrls | Array | 否 | 用于注入跟踪 Headers 的请求 URL 列表。请参阅[集成rum与分布式追踪](https://docs.flashcat.cloud/zh/flashduty/rum/advanced-configuration#%E9%9B%86%E6%88%90rum%E4%B8%8E%E5%88%86%E5%B8%83%E5%BC%8F%E8%BF%BD%E8%B8%AA) | -| traceSampleRate | Number | 否 | 要跟踪的请求百分比:100 为所有,0 为无。默认值:`100` | -| excludedActivityUrls | Array | 否 | 计算页面活动时忽略的请求来源列表。 | -| compressIntakeRequests | Boolean | 否 | 压缩发送到 FlashDuty 入口的请求,以减少发送大量数据时的带宽使用。压缩是在 Worker 线程中完成的。默认值:`false` | -| storeContextsAcrossPages | Boolean | 否 | 将全局上下文和用户上下文存储在 localStorage 中以沿用户导航保留它们。默认值:`false` | -| allowUntrustedEvents | Boolean | 否 | 允许捕获[不受信任的事件](https://developer.mozilla.org/zh-CN/docs/Web/API/Event/isTrusted),例如在自动化 UI 测试中。默认值:`false` | +| 配置项 | 类型 | 必填 | 必填 | 说明 | +| ----------------------------------- | -------------------------- | ----------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---- | +| applicationId | String | 是 | 应用 ID,在应用管理页面获取 | +| clientToken | String | 是 | 客户端 Token,在应用管理页面获取 | +| service | String | 是 | 服务名称,用于区分不同的服务 | +| env | String | 否 | 环境标识,如 production、staging 等 | +| version | String | 否 | 应用版本号 | +| trackingConsent | "granted" \| "not-granted" | 否 | 设置初始用户跟踪同意状态。请参阅用户跟踪同意。默认值:`granted` | +| trackViewsManually | Boolean | 否 | 允许您控制 RUM 视图的创建。请参阅覆盖默认 RUM 视图名称。默认值:`false` | +| trackUserInteractions | Boolean | 否 | 启用自动收集用户操作。默认值:`true` | +| trackResources | Boolean | 否 | 启用资源事件的收集。默认值:`true` | +| trackLongTasks | Boolean | 否 | 启用长任务事件的收集。默认值:`true` | +| trackAnonymousUser | Boolean | 否 | 启用跨会话收集匿名用户 ID。默认值:`true` | +| enablePrivacyForActionName | Boolean | 否 | 请参见掩码操作名称。默认值:`false` | +| actionNameAttribute | String | 否 | 指定您自己的属性以用于命名操作。`false` | +| sessionSampleRate | Number | 否 | 要跟踪的会话百分比:100 为所有,0 为无。仅跟踪的会话发送 RUM 事件。默认值:`100` | +| sessionReplaySampleRate | Number | 否 | 启用[会话重放](https://docs.flashcat.cloud/zh/flashduty/rum/session-replay)功能的跟踪会话百分比:全部为 100,无则为 0。默认值:`0` | +| sessionReplayPrivacyLevel | String | 'mask-user-input' | 会话重放数据采集时,隐私策略。 'allow'会采集除 password 外所有的数据,'mask-user-input'会隐藏用户数据框内容, 'mask-all' 将会隐藏所有文本信息 | +| startSessionReplayRecordingManually | Boolean | 否 | 是否手动开启会话重放采集开关 | +| silentMultipleInit | Boolean | 否 | 如果 RUM 浏览器 SDK 已在页面上初始化,则初始化会静默失败。默认值:`false` | +| proxy | String | 否 | 可选代理 URL,例如:`https://www.proxy.com/path` | +| allowedTracingUrls | Array | 否 | 用于注入跟踪 Headers 的请求 URL 列表。请参阅[集成 rum 与分布式追踪](https://docs.flashcat.cloud/zh/flashduty/rum/advanced-configuration#%E9%9B%86%E6%88%90rum%E4%B8%8E%E5%88%86%E5%B8%83%E5%BC%8F%E8%BF%BD%E8%B8%AA) | +| traceSampleRate | Number | 否 | 要跟踪的请求百分比:100 为所有,0 为无。默认值:`100` | +| excludedActivityUrls | Array | 否 | 计算页面活动时忽略的请求来源列表。 | +| compressIntakeRequests | Boolean | 否 | 压缩发送到 FlashDuty 入口的请求,以减少发送大量数据时的带宽使用。压缩是在 Worker 线程中完成的。默认值:`false` | +| storeContextsAcrossPages | Boolean | 否 | 将全局上下文和用户上下文存储在 localStorage 中以沿用户导航保留它们。默认值:`false` | +| allowUntrustedEvents | Boolean | 否 | 允许捕获[不受信任的事件](https://developer.mozilla.org/zh-CN/docs/Web/API/Event/isTrusted),例如在自动化 UI 测试中。默认值:`false` | ## 应用场景 diff --git "a/flashduty/zh/2. RUM/5.\344\274\232\350\257\235\351\207\215\346\224\276/1. \346\246\202\350\247\210.md" "b/flashduty/zh/2. RUM/5.\344\274\232\350\257\235\351\207\215\346\224\276/1. \346\246\202\350\247\210.md" new file mode 100644 index 00000000..e916eab3 --- /dev/null +++ "b/flashduty/zh/2. RUM/5.\344\274\232\350\257\235\351\207\215\346\224\276/1. \346\246\202\350\247\210.md" @@ -0,0 +1,78 @@ +--- +title: "RUM 会话重放功能概览" +description: "掌握 Flashduty RUM 的会话重放功能,通过重现用户操作路径快速定位问题并优化用户体验。" +date: "2024-05-09T10:00:00+08:00" +url: "https://docs.flashcat.cloud/zh/flashduty/rum/session-replay" +--- + +## 概述 + +Flashduty RUM 的 **会话重放功能**(Session Replay)是一款强大的用户行为分析工具,旨在帮助开发者通过重现用户在网站或应用中的操作路径,结合 RUM 性能和异常追踪数据,可直观了解用户体验,快速定位问题根因。 + +## 核心功能 + +1. **用户操作录制**:自动记录用户的鼠标点击、页面滚动、表单输入、导航行为等操作,生成直观的会话回放视频。 +2. **异常关联**:将会话重放与异常追踪结合,自动关联异常发生时的用户操作和页面状态,帮助快速定位问题触发场景。 +3. **交互分析**:提供用户交互时间线,展示用户操作序列、页面加载时间以及关键事件(如错误或网络请求失败)的发生点。 +4. **隐私保护**:提供灵活的隐私配置,可屏蔽敏感信息(如表单输入内容)或限制录制范围,确保数据合规性。 + +## 价值与优势 + +1. **直观问题定位**:通过可视化回放,快速了解用户遇到问题的具体操作路径,减少排查时间。 +2. **提升用户体验**:洞察用户行为模式,发现交互痛点,优化页面设计和功能逻辑。 +3. **数据驱动优化**:结合异常数据和用户行为分析,为产品迭代提供可靠的数据支持。 + +## 使用场景 + +1. **问题复现**:通过重放用户会话,复现异常发生时的操作场景,快速定位问题根源。 +2. **用户行为分析**:分析用户在关键页面(如支付、注册)的行为,优化用户体验和转化率。 +3. **调试与优化**:结合异常追踪,识别页面加载慢、交互卡顿等问题,优化前端性能。 +4. **客户支持**:通过回放用户会话,快速了解用户反馈的问题,提供更精准的支持。 + +## 会话重放流程 + +Flashduty RUM 的会话重放功能分为两个关键阶段:**行为记录与回放**、**问题分析与优化**。 + +### 1. 行为记录与回放 + +快速记录用户行为并生成回放是分析的第一步。在录制阶段,录制 SDK 会将当前 dom 和 css 样式打快照,并在用户行为(DOM 变化、鼠标移动、点击、表单输入等)发生时收集对应的事件。通过序列化、压缩、去除敏感信息后进行数据上报。 + +### 2. 问题分析与优化 + +Flashduty RUM 提供丰富的行为数据和分析工具,帮助定位问题并优化体验: + +#### 核心行为数据 + +- **用户交互**:点击、滚动、输入、导航等操作的时间线。 +- **页面性能**:页面加载时间、资源加载失败、API 调用延迟等。 +- **异常上下文**:异常发生时的页面状态、DOM 结构和用户操作。 + +#### 上下文信息 + +- **用户环境**:浏览器、设备、操作系统、网络状况。 +- **操作路径**:用户在会话中的完整操作序列。 +- **页面快照**:异常发生时的页面 DOM 快照。 + +通过 Flashduty RUM 的可视化回放工具,您可以快速分析用户行为与问题之间的关联: + +| 问题类型 | 典型表现 | 可能原因 | 定位方法 | +| ---------------- | -------------------- | -------------------------- | ---------------------- | +| **页面加载慢** | 页面白屏、加载超时 | 资源加载失败、网络延迟 | 查看是否有资源加载异常 | +| **功能失效** | 按钮点击无反应 | 代码逻辑错误、事件绑定问题 | 查看具体行为和异常 | +| **表单提交失败** | 数据未保存、提交失败 | API 响应错误、表单验证问题 | 查看错误和异常详情 | + +## 问题分析工具 + +#### 1.会话回放面板 + +在播放器中,您可以查看用户的所有操作,包括点击、滚动和输入等,支持快进、回放和 seek 等播放行为控制,帮助开发者直观复现问题场景并精准分析用户行为。 + +#### 2. 事件与上下文关联 + +会话回放支持与各类事件(如视图加载、错误、用户行为)关联,允许查看详细的 errors 和 attributes(上下文信息,如设备类型、浏览器版本、地理位置等),方便定位问题根因并进行深入分析。 + +## 下一步 + +- [SDK 配置](https://docs.flashcat.cloud/zh/flashduty/rum/session-replay-config) +- [查看会话回放](https://docs.flashcat.cloud/zh/flashduty/rum/session-replay-explorer) +- [了解隐私保护设置](https://docs.flashcat.cloud/zh/flashduty/rum/privacy-settings) diff --git "a/flashduty/zh/2. RUM/5.\344\274\232\350\257\235\351\207\215\346\224\276/2. SDK \351\205\215\347\275\256.md" "b/flashduty/zh/2. RUM/5.\344\274\232\350\257\235\351\207\215\346\224\276/2. SDK \351\205\215\347\275\256.md" new file mode 100644 index 00000000..60aac3c4 --- /dev/null +++ "b/flashduty/zh/2. RUM/5.\344\274\232\350\257\235\351\207\215\346\224\276/2. SDK \351\205\215\347\275\256.md" @@ -0,0 +1,93 @@ +--- +title: "RUM 会话重放SDK配置" +description: "掌握 Flashduty RUM 的会话重放功能,通过重现用户操作路径快速定位问题并优化用户体验。" +date: "2024-05-09T10:00:00+08:00" +url: "https://docs.flashcat.cloud/zh/flashduty/rum/session-replay-config" +--- + +## 概述 + +Flashduty RUM 的会话重放功能集成于 RUM SDK 中,通过简单配置采样比例和隐私规则,即可快速启用重放功能。 + +## 开启采集 + +### 自动采集 + +重放 SDK 已集成至 RUM SDK,配置采样比例便可开启重放功能。 + +```js +window.FC_RUM.init({ + applicationId: "YOUR_APPLICATION_ID", + clientToken: "YOUR_CLIENT_TOKEN", + // ... + sessionReplaySampleRate: 10, // 默认会话重放的session采样率10% + // ... +}); +``` + +::: tip + +采样方式:在客户端 sdk 初始化 session 时生成 0-1 之间的随机数,与 `rate/100` 进行大小比较。如落在区间内,则该 session 会作为采集样本,回放数据会在 session 周期内采集与上报。 + +在 session 被采样的基础上,会话重放的采样率(sessionReplaySampleRate)会被进行二次计算和采样。 +::: + +默认配置采样率后,会在`RUM.init()`执行后开启自动采集。若想手动控制采集时机(如用户登录后再进行数据采集),可先开启手动采集开关,再手动调用 record 方法。 + +```js +window.FC_RUM.init({ + applicationId: "YOUR_APPLICATION_ID", + clientToken: "YOUR_CLIENT_TOKEN", + // ... + sessionReplaySampleRate: 10, // 采样率10% + startSessionReplayRecordingManually: true, // 开启手动采集开关 + // ... +}); + +if (userIsShouldRecord()) { + // 如果满足某些条件,可开启回放 + window.FC_RUM.startSessionReplayRecording(); // 在调用时再开启数据采集 +} +``` + +开启采集后,可通过`stopSessionReplayRecording()`方法停止采集。 + +### 强制开启 + +在某些场景下,即使采样率并未命中,也希望采集该 session 相关数据(如重点监测刚上线的功能,或者捕获某个异常后希望上报后续操作),此时可以通过调用 +`startSessionReplayRecording({ force: true })`方法来强制开启重放。 + +::: warning +注:只有当本次 session 被采样,而 sessionReplay 未被采样的情况下,强制开启才会生效。如果 session 本身并没有被采样,即使强制开启 replay 也无效。 +::: + +## 关闭采集 + +如果需要关闭采集功能,将对应的 replay 采样率调整至 0 或者直接去掉该配置项即可。 + +```js +window.FC_RUM.init({ + applicationId: "YOUR_APPLICATION_ID", + clientToken: "YOUR_CLIENT_TOKEN", + // ... + sessionReplaySampleRate: 0, // 关闭重放功能 + // ... +}); +``` + +## 工作原理 + +会话重放 SDK 基于 [rrweb](https://www.rrweb.io/) 实现。 + +在录制阶段,录制 SDK 会将当前 dom 和 css 样式打快照,并在用户行为(DOM 变化、鼠标移动、点击、表单输入等)发生时收集对应的事件。通过序列化、压缩、去除敏感信息后进行数据上报。 + +在重放阶段,播放 SDK 会根据快照进行 dom 重建,并在合适的时机将事件行为转换为 dom 变化并进行展示。 + +在数据上报前,SDK 会提前进行数据压缩,并将该 CPU 密集操作放在 web worker 中执行,不会影响主线程渲染。 + +SDK 兼容性和 RUM SDK 一致,支持 IE11 以上浏览器。 + +## 下一步 + +- [查看会话回放](https://docs.flashcat.cloud/zh/flashduty/rum/session-replay-explorer) +- [了解隐私保护设置](https://docs.flashcat.cloud/zh/flashduty/rum/privacy-settings) diff --git "a/flashduty/zh/2. RUM/5.\344\274\232\350\257\235\351\207\215\346\224\276/3. \344\274\232\350\257\235\346\237\245\347\234\213.md" "b/flashduty/zh/2. RUM/5.\344\274\232\350\257\235\351\207\215\346\224\276/3. \344\274\232\350\257\235\346\237\245\347\234\213.md" new file mode 100644 index 00000000..63f4ddeb --- /dev/null +++ "b/flashduty/zh/2. RUM/5.\344\274\232\350\257\235\351\207\215\346\224\276/3. \344\274\232\350\257\235\346\237\245\347\234\213.md" @@ -0,0 +1,53 @@ +--- +title: "查看 RUM 会话重放记录" +description: "掌握 Flashduty RUM 的会话重放功能,通过重现用户操作路径快速定位问题并优化用户体验。" +date: "2024-05-09T10:00:00+08:00" +url: "https://docs.flashcat.cloud/zh/flashduty/rum/session-replay-explorer" +--- + +## 概述 + +Flashduty RUM 的会话重放功能通过直观地重现用户操作路径,帮助开发者快速定位问题、分析用户行为并优化产品体验。集成于 RUM SDK 中,只需简单配置即可启用,支持灵活的采样策略和隐私规则设置。会话重放提供强大的播放器和 Devtools 功能,包括操作时间线、异常分析和上下文信息查看,助力开发者高效排查问题并深入了解用户交互细节。 + +## 会话列表 + +在「会话重放」菜单中,您可以查看最近的会话记录,默认按时间倒序排列。支持按会话时长、视图数量、行为数量、异常数量等字段排序,并提供丰富的筛选条件(如时间范围、页面、标签等),便于快速定位目标重放记录。 + +点击任一记录项,将打开播放器面板,分为以下区域: + +- **信息展示区**:展示会话的访问时间、起始与结束页面、标签等上下文信息。 +- **播放区**:以用户视角重现操作路径,清晰展示用户交互细节。 +- **播放控制区**:提供播放控制功能,方便操作。 + +![会话重放面板](https://docs-cdn.flashcat.cloud/imges/png/cc05420113db42bef5a770af8656db4b.png) +:::tip +为方便快速浏览,列表中仅展示持续时间 **大于 3 秒** 的回放 +::: + +## 播放器 + +播放器支持播放、暂停、快进、快退、重播、倍速播放、全屏和 Seek 等功能,并支持快捷键操作,提升使用效率。播放过程中,时间轴上会以不同颜色的图标标记用户行为(Action)和异常(Error),便于快速概览会话中的关键事件。 +![播放器界面](https://docs-cdn.flashcat.cloud/imges/png/c43b87b7764c5b0a136b0d721eb538cf.png) + +默认情况下,播放器会自动跳过非活跃片段以提高查看效率。您也可以通过配置关闭此功能,按实际时序完整播放。 +![非活跃片段配置](https://docs-cdn.flashcat.cloud/imges/png/02db89ad438312f34fbfcc95e0aa5916.png) + +## Devtools + +通过「查看全部事件和异常」功能,可进入宽屏模式,查看会话的操作时间线和详细分析。Devtools 包含以下功能: + +- **Events Tab**:展示会话中的所有用户操作,支持以下功能: + + - 切换相对时间与绝对时间显示。 + - 按事件类型筛选(如点击、页面跳转等)。 + - 点击具体事件,播放器将自动跳转至对应时间戳。 + + ![事件时间线](https://docs-cdn.flashcat.cloud/imges/png/e903b09dd88de3837e9c88959181dba9.png) + +- **Error Tab**:列出会话中的所有异常和问题,支持点击跳转至详细错误信息,便于快速定位和分析。 + +- **Attributes Tab**:展示会话的上下文信息(如设备、浏览器、地理位置等),帮助开发者深入了解问题背景并进行精准定位。 + +## 下一步 + +- [了解隐私保护设置](https://docs.flashcat.cloud/zh/flashduty/rum/privacy-settings) diff --git "a/flashduty/zh/2. RUM/5.\344\274\232\350\257\235\351\207\215\346\224\276/4. \351\232\220\347\247\201\344\277\235\346\212\244\350\257\264\346\230\216.md" "b/flashduty/zh/2. RUM/5.\344\274\232\350\257\235\351\207\215\346\224\276/4. \351\232\220\347\247\201\344\277\235\346\212\244\350\257\264\346\230\216.md" new file mode 100644 index 00000000..954f9fc4 --- /dev/null +++ "b/flashduty/zh/2. RUM/5.\344\274\232\350\257\235\351\207\215\346\224\276/4. \351\232\220\347\247\201\344\277\235\346\212\244\350\257\264\346\230\216.md" @@ -0,0 +1,68 @@ +--- +title: "RUM 会话重放隐私保护" +description: "掌握 Flashduty RUM 的会话重放功能,通过重现用户操作路径快速定位问题并优化用户体验。" +date: "2024-05-09T10:00:00+08:00" +url: "https://docs.flashcat.cloud/zh/flashduty/rum/session-replay-privacy" +--- + +## 概述 + +为满足不同场景的隐私需求,会话重放功能内置了灵活的隐私保护策略。通过配置 `defaultPrivacyLevel` 字段,开发者可控制数据采集的敏感度,支持从显示所有文本(除密码外)到完全隐藏页面文本的多种模式,确保用户数据的安全性和合规性 + +## 隐私策略 + +会话重放功能通过 `defaultPrivacyLevel` 字段提供灵活的隐私保护配置,确保在采集用户操作数据时兼顾功能性和数据安全。以下为三种主要隐私级别配置及其效果: +:::tip +input 类型为 password 的输入为敏感信息,所有场景都不会收集。 +::: + +### 隐藏页面所有文本 + +配置 `defaultPrivacyLevel: "mask"` 将完全隐藏页面中的所有文本内容,仅保留操作行为和页面结构,适合对数据隐私要求校高的场景。 + +```js +window.FC_RUM.init({ + applicationId: "YOUR_APPLICATION_ID", + clientToken: "YOUR_CLIENT_TOKEN", + // ... + sessionReplaySampleRate: 10, // 默认采样率10% + defaultPrivacyLevel: "mask", + // ... +}); +``` + +![隐藏页面所有文本](https://docs-cdn.flashcat.cloud/imges/png/3c123bbf8fd30482da766ab009c16b0e.png) + +### 隐藏数据框内容 + +配置 `defaultPrivacyLevel: "mask-user-input"` 将隐藏用户输入框中的内容(如文本输入、选择框等),但保留页面其他文本,适用于需要保护用户输入隐私的场景。 + +```js +window.FC_RUM.init({ + applicationId: "YOUR_APPLICATION_ID", + clientToken: "YOUR_CLIENT_TOKEN", + // ... + sessionReplaySampleRate: 10, // 默认采样率10% + defaultPrivacyLevel: "mask-user-input", + // ... +}); +``` + +![隐藏数据框内容](https://docs-cdn.flashcat.cloud/imges/png/5c43c6f6196a95334a8b253fa33360c9.png) + +### 显示所有文本(除密码) + +配置 `defaultPrivacyLevel: "allow"` 允许采集页面中除密码字段外的所有文本内容,适合需要完整用户交互细节的场景。 + +```js +window.FC_RUM.init({ + applicationId: "YOUR_APPLICATION_ID", + clientToken: "YOUR_CLIENT_TOKEN", + // ... + sessionReplaySampleRate: 10, // 默认采样率10% + defaultPrivacyLevel: "allow", + // ... +}); +``` + +![显示所有文本](https://docs-cdn.flashcat.cloud/imges/png/4cae182c91c7df152cbcf86c2978f443.png) diff --git "a/flashduty/zh/2. RUM/5. \345\205\266\344\273\226/1. \346\234\257\350\257\255\350\257\264\346\230\216.md" "b/flashduty/zh/2. RUM/6. \345\205\266\344\273\226/1. \346\234\257\350\257\255\350\257\264\346\230\216.md" similarity index 100% rename from "flashduty/zh/2. RUM/5. \345\205\266\344\273\226/1. \346\234\257\350\257\255\350\257\264\346\230\216.md" rename to "flashduty/zh/2. RUM/6. \345\205\266\344\273\226/1. \346\234\257\350\257\255\350\257\264\346\230\216.md" diff --git "a/flashduty/zh/2. RUM/5. \345\205\266\344\273\226/2. \346\225\260\346\215\256\346\224\266\351\233\206.md" "b/flashduty/zh/2. RUM/6. \345\205\266\344\273\226/2. \346\225\260\346\215\256\346\224\266\351\233\206.md" similarity index 100% rename from "flashduty/zh/2. RUM/5. \345\205\266\344\273\226/2. \346\225\260\346\215\256\346\224\266\351\233\206.md" rename to "flashduty/zh/2. RUM/6. \345\205\266\344\273\226/2. \346\225\260\346\215\256\346\224\266\351\233\206.md" diff --git "a/flashduty/zh/2. RUM/5. \345\205\266\344\273\226/4. \346\225\260\346\215\256\345\256\211\345\205\250.md" "b/flashduty/zh/2. RUM/6. \345\205\266\344\273\226/4. \346\225\260\346\215\256\345\256\211\345\205\250.md" similarity index 100% rename from "flashduty/zh/2. RUM/5. \345\205\266\344\273\226/4. \346\225\260\346\215\256\345\256\211\345\205\250.md" rename to "flashduty/zh/2. RUM/6. \345\205\266\344\273\226/4. \346\225\260\346\215\256\345\256\211\345\205\250.md" diff --git a/package.json b/package.json index cb75973c..198f8b84 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "flashduty-knowledge-base", - "version": "1.3.2", + "version": "1.3.3", "description": "flashduty knowledge base", "type": "module", "engines": { diff --git a/src/en.ts b/src/en.ts index a1a50881..f1541bd5 100644 --- a/src/en.ts +++ b/src/en.ts @@ -51,6 +51,7 @@ import VolcEngineDetect from "../flashduty/en/1. On-call/8. Integrations/8.1 Ale import Monit from "../flashduty/en/1. On-call/8. Integrations/8.1 Alerts integration/8.1.49 Monit Alert Integration.md?raw"; import Rum from "../flashduty/en/1. On-call/8. Integrations/8.1 Alerts integration/8.1.50 RUM Alert Integration.md?raw"; import Cloudflare from "../flashduty/en/1. On-call/8. Integrations/8.1 Alerts integration/8.1.51 Cloudflare Integration.md?raw"; +import WecomAlert from "../flashduty/en/1. On-call/8. Integrations/8.1 Alerts integration/8.1.52 WecomAlert Integration.md?raw"; /** ⬆️⬆️⬆️⬆️ 告警集成 ⬆️⬆️⬆️⬆️ */ /** ⬇️⬇️⬇️⬇️ 变更事件 ⬇️⬇️⬇️⬇️ */ @@ -149,6 +150,7 @@ const docs = { ServiceNowSync, Monit, Rum, - Cloudflare + Cloudflare, + WecomAlert }; export default docs; diff --git a/src/zh.ts b/src/zh.ts index 42ab2b82..233f7250 100644 --- a/src/zh.ts +++ b/src/zh.ts @@ -51,6 +51,7 @@ import VolcEngineDetect from "../flashduty/zh/1. On-call/5. 集成引导/8.1 告 import Monit from "../flashduty/zh/1. On-call/5. 集成引导/8.1 告警集成/8.1.49 Monit 告警集成指引.md?raw"; import Rum from "../flashduty/zh/1. On-call/5. 集成引导/8.1 告警集成/8.1.50 RUM 告警集成指引.md?raw"; import Cloudflare from "../flashduty/zh/1. On-call/5. 集成引导/8.1 告警集成/8.1.51 Cloudflare 集成指引.md?raw"; +import WecomAlert from "../flashduty/zh/1. On-call/5. 集成引导/8.1 告警集成/8.1.52 企微告警集成指引.md?raw"; /** ⬆️⬆️⬆️⬆️ 告警集成 ⬆️⬆️⬆️⬆️ */ /** ⬇️⬇️⬇️⬇️ 变更事件 ⬇️⬇️⬇️⬇️ */ @@ -147,6 +148,7 @@ const docs = { ServiceNowSync, Monit, Rum, - Cloudflare + Cloudflare, + WecomAlert }; export default docs;