Splunk Completes Acquisition of Plumbr Learn more

Transaction Management

In most cases the browser agent is able to automatically detect all of the the user interactions. However there might be cases where you’d want to start transactions manually.


Starts a new transaction under serviceName service. As there can only be one ongoing transaction at a time, there is no API call for ending transaction. Starting a new transaction will always end the ongoing transaction

Example usage: Starting a transaction when document receives an external-force event

document.addEventListener('external-force', function (event) {
    try {
        PLUMBR.startTransaction('External force');
    } catch(err) {}

Note: Include the api call as close to the source as possible. That way when the browser agent starts detecting it natively, it will try to avoid creating multiple transactions.

document.getElementById('sign-up').addEventListener('click', function (event) {
    try {
        PLUMBR.startTransaction('User signs up');
        // Because browser agent has already detected the click it will be translated to
        // PLUMBR.setServiceName('User signs up')
    } catch(err) {}

    registerUser({ /* ... */ });