You can include extra information in traces, errors and http failures by using the atatus_add_custom_data() function.

Compatibility

Compatible with all PHP agent versions.

Syntax

atatus_add_custom_data($key, $value)

Parameter

Parameter Type Description
$key String (Required) Custom data name.
$value Scalar (Required) Custom data value.

Example

copy
icon/buttons/copy
<?php

if (extension_loaded('atatus')) {
    // Record custom data about this transaction
    atatus_add_custom_data("name", "John Doe");
    atatus_add_custom_data("email", "john.doe@acme.com");
    atatus_add_custom_data("account", 6767);
    atatus_add_custom_data("paid", true);
}