Persisting current user session

EXAMPLE: SAVE USER SESSION RECORD ON SUPPORT REQUEST

On user support request, please call createIssue. It saves debuggable current user session to the server and creates a new issue entry. The default duration of a recorded user session is 3 minutes.

function onUserClickedOpenSupportChatButton() {
    kuoll("createIssue", "apiCreateIssue", "User opened support chat");
}

EXAMPLE: DEFAULT createIssueOn PARAMS

try {
    // ..
} catch(e) {
    var description = "Must never happen",
        stacktrace = e.stack;
    kuoll("createIssue", "JavaScript error", description, stacktrace);
}

Kuoll script also creates issues on JavaScript exceptions (Errors), when server XHR returns error reply (HTTP status 4xx or 5xx) and when your web app is logging using the console.error method. You can control it with createIssueOn parameter of kuoll('createIssue', {createIssueOn:{...}}. Find detailed description is the table above.