I have added the RUM JS to the Lightning component of Salesforce, but its not showing any statistics. Can anyone shed some light into this issue
If you are able to add the injection line to the html of the page, you will be able to monitor the page using End User monitoring. If you could share the HAR file here I will be able to provide more information if the injection is happening properly, the java script agent are loaded or not and if the beacons are getting posted successfully.
I do not see appdynamics java script agent being loaded in the HAR file. Checking the source of the page, I do not see any injection line as well for the instrumentation. Please make sure you are adding the injection line to the HTML content of the page as documented here:
Please attach the new HAR file for the request which you have instrumented. Also please attach the source (if possible) to show us how you are doing instrumentation. As Amit refered we could see the ADRUM JS agent in the source while reviewing last HAR file.
Salesforce support told us that the Locker Service block external script call for security reason :
But the Support told us that it might be possible to load the JS lib directly in Salesforce.
Perfectly agree with you concerning the missing inclusion, my point was that problem with CORS must be taken into account following the injection.
Have you any documentation concerning specifically Salesforce Commerce Cloud instrumentation ?
Nothing specific to Salesforce Commerce Cloud but in general, https://docs.appdynamics.com/pages/viewpage.action?pageId=40077665 discuss how to make configurations to enable CSP, so your application is compatible with Browser RUM.