Our next-gen architecture is built to help you make sense of your ever-growing data. Watch a 4-min demo video!

Back to All Docs

Track User Sessions with Errors

Last Updated: Jun. 14, 2024

Coralogix allows you to selectively track user sessions with errors, minimizing data overhead while focusing on critical issues.

Overview

Track only those RUM User Sessions with errors. This feature instructs the SDK to cache RUM events up to a specified limit when configured. If an error occurs during a session, all cached events and the error details are sent to the server for analysis. This approach ensures that only sessions with errors are tracked, reducing data noise and focusing on critical issues that require attention, ultimately saving costs.

Configuration

Basic configuration

To configure the RUM feature to track only user sessions with errors, use the following configuration snippet:

CoralogixRum.init({
  // ...
  sessionConfig:{
    onlyWithErrorConfig: {
      enable: true, // Whether to track only sessions with errors, defaults to false
      maxRumEvents: 5000, // Maximum number of cached RUM events to store in cache up until error is coming, defaults to 5000, max 20000
      maxRecordTime: 10_000, // Maximum time in milliseconds to store last record events in cache before error occurred, defaults to 10000(10s), max 60000(1m)
      /**
       * Specifies the instrumentation data to be sent for sessions with errors, defaulting to web-vitals only.
       * The instrumentation data will only be sent if it is enabled in the main configuration.
       * This data will be sent immediately, even if no error has occurred.
       */
      instrumentationsToSend:{
        [CoralogixEventType.WEB_VITALS]: true,
        // more instrumentation's can be added
        // [CoralogixEventType.LONG_TASK]: true,
        //...
      }
    }
  },
});

Configuration parameters

ParameterTypeDefaultDescription
enableBooleanFalseWhen set to true, only sessions with errors will be tracked.
maxRumEventsNumber5000Specifies the maximum number of RUM events to store in the cache until an error occurs. This helps in capturing relevant data leading up to the error. Maximum value is 20000.
maxRecordTimeNumber10000Maximum time in milliseconds to store last record events in cache before an error occurs. Defaults to 10000(10s), max 60000(1m).
instrumentationsToSendObject{ [CoralogixEventType.WEB_VITALS]: true }Defines the instrumentations to send for sessions with errors. If enabled in the main configuration, these instrumentations are sent immediately, even if no error has occurred, and they are not part of the cached RUM events.

Usage

Once enabled, Coralogix will only track and report user sessions that encounter errors. This ensures that your monitoring data is focused on sessions with issues, aiding in quicker identification and resolution of user experience problems.

Support

Need help?

Our world-class customer success team is available 24/7 to walk you through your setup and answer any questions that may come up.

Feel free to reach out to us via our in-app chat or by sending us an email to support@coralogix.com.

On this page