Troubleshooting¶
How to Determine if the RUM SDK Initialization is Successful¶
- Open the browser console:
- Check whether the object
DATAFLUX_RUM
exists:
Exists:
Does not exist:
- Execute
DATAFLUX_RUM.getInternalContext()
to check if the object has been initialized successfully:
If initialization is successful, you can retrieve information about objects such as the current application page's session
, application
, and view
.
Initialization Failed¶
- If you are integrating via CDN, ensure that your application is an
https
site; - Verify the configuration is correct (including the format and names of configuration parameters).
Initialization Succeeded, but Data Is Not Reported or Partially Reported¶
- Check the browser version information and confirm that it supports the data according to the browser support list;
- Check the initialization position of the RUM browser SDK and consider executing the initialization operation as early as possible in your application code.
XHR/FETCH Requests Are Not Associated with the APM Trace¶
Check if the allowedTracingOrigins
configuration in the initialization settings is enabled and verify that the format is correct. (If using a regular expression, ensure that the array contains actual regular expressions, not strings)
Correct
datafluxRum.init({
applicationId: '<DATAFLUX_APPLICATION_ID>',
datakitOrigin: '<DATAKIT ORIGIN>',
env: 'production',
version: '1.0.0',
trackInteractions: true,
allowedTracingOrigins: [/https:\\/\\/.*\\.my-api-domain\\.com/] // Regular expressions should not be quoted
})
datafluxRum.init({
applicationId: '<DATAFLUX_APPLICATION_ID>',
datakitOrigin: '<DATAKIT ORIGIN>',
env: 'production',
version: '1.0.0',
trackInteractions: true,
allowedTracingOrigins: ["/https:\\/\\/.*\\.my-api-domain\\.com/"]
})
How to Confirm That APM and Frontend XHR/FETCH Are Successfully Linked¶
- Open the browser console;
- Confirm that the Request Headers of the XHR/FETCH requests contain the corresponding header keywords, as shown in the following image for ddtrace-related headers: