Skip to main content
Version: NG-3.2

Browser RUM-V2

Introduction​

Browser RUM (Real User Monitoring) delivers full visibility into the user experience across every digital transaction in web applications. It captures real user performance data directly from the browser, offering deep insights into page load times, user interactions, and frontend issues to optimize performance in real time.

Getting Started​

Compatibility​

Browser RUM is supported for the following browsers/runtime:

  • Google Chrome (Version 131.0.6778.85 and above)

Data Collection Method​





GSH Overview



Browser RUM collects real user monitoring data using VuNet’s JavaScript RUM Agent.

The recommended approach is to deploy a proxy server in the DMZ to receive telemetry from users' browsers running the web application. This proxy serves as a secure intermediary between the end-user browsers (where the RUM JavaScript agent executes) and the RUM data collector of the observability platform hosted within the internal network.






Prerequisites​

Inputs for Configuring Data Source​

  • Source ID: Distinguishes the source from other RUM sources and is used to associate incoming telemetry data with the correct source configuration.

  • SSL Required: Enable TLS communication for Browser RUM ingestion. Once enabled, browser RUM data sent from the application to the vuSmartMaps ingestion endpoint will be securely encrypted. After enabling this feature, follow the additional instrumentation configuration steps provided in the 'TLS Configuration' section of the instrumentation guide.

  • Traces Sampling Percentage: Specify the sampling percentage for trace data collected by browser RUM agent. A percentage number between 0 and 100 is to be provided. If 0% is used, RUM agent will not collect any traces. If 100% is used, RUM agent will collect and send all traces. When a number between 0 and 100 is used, the RUM agent will send the specified percentage of traces using a random sampling policy.

  • Session Replay Sampling Percentage: Specify the sampling percentage for session replay data collected by the browser RUM agent. A value between 0 and 100 must be provided.

  • If set to 0% , the RUM agent will not collect any session replay data.

  • If set to 100% , session replay data will be captured and sent for all user sessions.

  • For values between 0 and 100, the RUM agent uses a normalized percentage function to decide whether a session is selected for replay. The decision is based on the following logic: percentage(base + replayPercentage * RandomJitter) < replayPercentage

base : A numeric value generated by hashing the session ID (originally a string). RandomJitter : A randomness factor that can vary by ±25% to ensure better distribution across sessions. percentage : A function that normalizes the result to always fall within the range of 0 to 100.

  • Values above 100 (e.g., 105) are capped at 100.
  • Values below 0 (e.g., -5) are raised to 0. If the normalized value is less than the configured replayPercentage , the session is selected for replay. This mechanism helps control the volume of session replay data while maintaining fair and balanced sampling across sessions.
  • Allowed Origins: Allowed Origins: Comma-separated list of origins permitted to access the OpentTelemetry Collector. Example: "http://example.com,https://app.example.com,http://localhost:3000" If not specified, defaults to "*" (allow all origins)
  • Allowed Headers: Allowed Headers: Comma-separated list of HTTP headers permitted in CORS requests Example: "Content-Type,Authorization,X-Requested-With" If not specified, defaults to "*" (allow all headers)
  • Service: Name of the service this Browser RUM source represents, for example 'checkout-service' or 'web-frontend'. This value is sent as the service name by the RUM SDK and is used to identify and group traces, page loads, and session data for this service across dashboards and alerts.
  • Application: Name of the application you want to monitor, for example 'my-ecommerce-app'. This value identifies the application in the RUM SDK instrumentation and is used to group and filter all telemetry collected from it across dashboards.
  • CDN Options: Enable or disable loading the Browser RUM SDK from Vunet's hosted CDN (https://cdn.vunet.ai/rum/). Select 'Enable' if your application can load external scripts over the internet. Select 'Disable' if your environment is offline or restricted, so the SDK files can be downloaded and hosted locally instead.
  • SDK Version: Select the version of the Browser RUM SDK to instrument your application with.
  • Collection URL Override: Enable this option to override the default URL the RUM SDK sends collected data to. Select 'Enable' if the OpenTelemetry Collector is reachable at a custom host, port, or path, and provide that URL in 'Custom Collection URL'. Select 'Disable' to use the default collection endpoint.
  • Custom Collection URL: Enter the URL the Browser RUM SDK should send collected data to, e.g. https://collector.example.com/rum. This field is used only when Collection URL Override is enabled.

Firewall Requirement​

To collect data from this O11ySource, ensure the following ports are opened:

Source IPDestination IPDestination PortProtocolDirection
BrowserProxy Server443TCPInbound
Proxy ServervuSmartMaps Web Services443TCPOutbound
Proxy ServervuSmartMaps OTEL Collector4329*TCPOutbound

*Before providing the firewall requirements, please update the port based on the customer environment.

Configuring the Target​

Modify the application's front end code to include Vunet's JavaScript RUM Agent using CDN or NPM based on your environment. The complete instructions for instrumentation can be downloaded as a package from the Browser RUM O11ySource.

Configuration Steps​





GSH Overview







- *``
Enable
``**
the Browser RUM O11ySource.


Select the sources tab and press the
- *``
+
``**
button to add a new application that has to be monitored.


Provide the required configurations:



Application Name


SSL


Trace Sampling %


Session Replay %


Allowed Origins


Allowed Headers



Afterwards, select
- *``
Save and Continue
``**
to proceed with downloading the java script instrumentation package


Then click
- *``
Finish
``**
to close the data source window.



Integrating RUM SDK



Obtain the RUM SDK files.


With CDN access: Use the vunet-hosted CDN file directly:

https://cdn.vunet.ai/rum/vunet-rum-loader-v3.1.js




Offline / on-premises: Download the required SDK files using wget:

wget https://cdn.vunet.ai/rum/vunet-rum-core-v3.1.js wget https://cdn.vunet.ai/rum/vunet-rum-loader-v3.1.js wget https://cdn.vunet.ai/rum/vunet-rum-session-replay-v3.1.js






Add the RUM script to your HTML file's <head> section.


If CDN access is available:

<script id="vunet-rum" async crossorigin="anonymous" src="https://your-cdn/rum/vunet-rum-loader-v3.1.js" data-collection-source-url="https://collector.example.com/rum" data-service-name="my-service" data-service-namespace="my-app" ></script>




If CDN access is not available: Replace the src attribute with the local path where the SDK file was copied:

<script src="/path-to-local-copied-file/vunet-rum-loader-v3.1.js" ></script>






Rebuild and deploy the updated application to apply changes.








Metrics Collected​

The metrics are based on the input data collected.