Hotspots help capture and log widget load times, which enables better debugging of long portal load times.
Vorbereitungen
Role required: sp_admin
Prozedur
-
Navigate to .
-
Click the custom widget you want to add the hotspot to.
-
Insert the following code snippets into the Server script field:
Define a start time below the loading configuration expression:
var startTime = new GlideDateTime();
Retrieve widget instance identifier:
data.spInstanceId =
grInstanceRecord.getUniqueValue();
Add load time tracking:
new sn_cd.cd_Utils().postInstanceHotspot({
startTime: startTime,
callerId: data.spInstanceId,
shortDesc: '{insert a short description}'
});
-
Click Update.
Nächste Maßnahme
Open the Performance details window to view how long the custom widget takes to load data: View widget performance metrics