Protect sensitive data: Mask personally identifiable information and other sensitive data.
Associate user sessions: Link user sessions with internal user identifiers for support and troubleshooting.
Reduce data volume: Lower RUM data collection through sampling to optimize costs.
Enhance context: Add richer contextual information to data beyond default attributes.
name (string): View name, defaults to the page URL path.
service (string): Service name, defaults to the service specified when creating the RUM application.
version (string): Application version, defaults to the version specified when creating the RUM application.
context (object): Additional context for the view, applied to the view and its child events.
Action: The triggering Event and handling stack.
Resource (XHR): XMLHttpRequest, PerformanceResourceTiming, and handling stack.
Resource (Fetch): Request, Response, PerformanceResourceTiming, and handling stack.
Resource (Other): PerformanceResourceTiming.
Long Task: PerformanceLongTaskTiming.
view.url (string): Current page URL.
view.referrer (string): Previous page URL.
view.name (string): Current view name.
view.performance.lcp.resource_url (string): Resource URL for Largest Contentful Paint (LCP).
service (string): Application service name.
version (string): Application version.
action.target.name (string): Element involved in user interaction (for automatically collected actions only).
error.message (string): Error message.
error.stack (string): Error stack or supplementary information.
error.resource.url (string): Resource URL that triggered the error.
resource.url (string): Resource URL.
long_task.scripts.source_url (string): Script resource URL for long tasks.
long_task.scripts.invoker (string): Name of the invoking script.
context (object): Attributes added through global context API, view context API, or manually generated events (such as addError, addAction).
It is not recommended to store personally identifiable information in context, as localStorage data exceeds the user session lifecycle.
Not compatible with the trackSessionAcrossSubdomains option, as localStorage is only shared within the same domain.
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.
String: Matches any URL that starts with this value, for example https://api.example.com matches https://api.example.com/v1/resource.
RegExp: Uses the regex test() method to check if the URL matches.
Function: Accepts the URL as a parameter and executes the callback function, returning true indicates a successful URL match.
Ensure correct configuration of applicationId and clientToken to avoid data upload failures.
Adjust sampling rate and privacy settings according to application requirements, balancing data volume with compliance.
For micro-frontends or complex frontend frameworks, it is recommended to implement startView logic at the framework routing level.