Adding custom data

Custom events

Events are identified by a string and can have an optional dictionary of parameters that will be stored and passed along with the report.

    // Without any additional parameters

    // ...or with additional custom parameters
    Bugsee.event("payment_processed", {
                    "amount": 125,
                    "currency": "USD"});

Custom traces

Traces may be useful when you want to trace how a specific variable or state changes over time right before the problem happens.

    // Manually set value of 15 to property named "credit_balance"
    // any time it changes
    Bugsee.trace("credit_balance", 15);    

User/Session attributes

Besides email, any arbitrary attributes can be attached to the report as well. Issues are searchable by these attributes in the Bugsee dashboard as well.

    Bugsee.setAttribute("name", "John Doe");
    Bugsee.setAttribute("age", 23);
    Bugsee.setAttribute("married", false);

Once set, attributes persist until the application is uninstalled from the device. They can be cleared however using the following API.

    // Clear a single attribute by name

    // .. or clear all of them