Error analysis

A newer version of this documentation is available. Switch to the latest version docs.

You do not need to do anything to start the errors collection, it will start itself with Contentsquare SDK.

For best implementation practices of our library, explore the Contentsquare for Capacitor sample app.

Similar to web context, JS errors are collected out of the box if the collection is enabled in the web project associated to the Capacitor project.

Find more information on how Contentsquare handles JS errors in our JavaScript errors Help Center article.

API Errors automatically collects failed network requests.

If in-app features are enabled, a info log should appear with the details of the event (see Capacitor Debugging and Logging section):

CSLIB ℹ️ Info: API Error (from Webview) - GET 401 https://api.client.com

The way our SDK works is by auto-starting with the application launch and automatically collects failed network requests.

Once started, our SDK fetches its config from our servers. It will start collecting data from network events if the API Errors setting is enabled in the config (this is handled by the Contentsquare team).

The SDK monitors only the API Errors with response code above 400, and generates analytics data. These events are then locally stored, and eventually sent to our servers in batches.

For each network error, a new event will be sent in analytics and Session Replay data.

API Errors troubleshooting details enables you to collect more information about API errors so you can troubleshoot errors faster.

With this feature you will be able to see three types of additional API error details in the Event Stream of Session Replay.

  • The HTTP headers of the request and the response.
  • The body (the data sent by the request or received in the response).
  • The query parameters of the request endpoint (of the URL of the information you request for).

See API Troubleshooting Details for more details.

Only network calls in error (response code above 400) will be collected.
Here the exhaustive list of data collected:

  • URL (without query strings)
  • HTTP method
  • Response code
  • Timestamp of the request
  • Timestamp of the response
  • HTTP headers of the request
  • HTTP headers of the response
  • HTTP body of the request
  • HTTP body of the response
  • Query parameters of the request endpoint

Known limitations and recommendations

Section titled Known limitations and recommendations

Conflict with Firebase Performance Monitoring

Section titled Conflict with Firebase Performance Monitoring

Contentsquare Error Analysis is not compatible with Firebase Performance Monitoring auto-collection. Only one of the two will log events, and usually, the events will be automatically logged by the Contentsquare Error Analysis. To log events to Firebase Performance Monitoring, we suggest logging it manually.