Skip to content

Analyzing Header and Payload Data

Overview

RUM browser SDK provides advanced data extraction capabilities, allowing you to thoroughly analyze both the headers and payloads of your network requests. By enabling this feature, you gain in-depth insights into your application's communication patterns, including response codes, request metadata, and payload content. This level of detail empowers you to investigate issues with greater precision, enhancing both security and performance. With full access to headers and payloads, you can identify anomalies, debug network behavior effectively, and ensure your application operates seamlessly under all conditions.

Configuration

To properly monitor network call performance, specify custom rules for capturing network requests and responses using our RUM browser SDK. The networkExtraConfig property is an array of configuration objects, each specifying custom rules for capturing network requests and responses. These calls collect data from Fetch and XMLHttpRequest calls, attaching specified request and response information, headers, and payloads to each network event.

CoralogixRum.init({
  networkExtraConfig: [
    {
      url: 'http://example.com',               // Capture requests to this specific URL or regex pattern
      reqHeaders: ['Authorization', 'Content-Type'], // Capture 'Authorization' and 'Content-Type' headers in requests
      resHeaders: ['Cache-Control', 'Date'],   // Capture 'Cache-Control' and 'Date' headers in responses
      collectReqPayload: true,                    // Collect request payload
      collectResPayload: false                    // Do not collect response payload
    },
  ],
});

Note

The server must explicitly allow access to specific headers by including them in the Access-Control-Expose-Headersresponse header. Due to limitations in the Fetch and XHR APIs, header retrieval is based on a best-effort approach. As a result, some headers may occasionally be unavailable in the events collected by this integration. Additionally, any payloads exceeding the allowed size will be dropped.

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 at [email protected].