Increments the named metric by the incrementBy value.
If a metric with the given name doesn't exist, a new one will be created starting with the value of incrementBy.
trace.incrementMetric('hits', 1);
Name of the metric to increment. Must not have a leading or trailing whitespace, no leading underscore '_' character and have a max length of 32 characters.
The value the metric should be incremented by.
Sets a String value for the specified attribute. Updates the value of the attribute if it already exists. The maximum number of attributes that can be added is 5.
trace.putAttribute('userId', '123456789');
Name of the attribute. Max length is 40 chars.
Value of the attribute. Max length is 100 chars.
Sets the value of the named metric with the provided number.
If a metric with the given name exists it will be overwritten. If a metric with the given name doesn't exist, a new one will be created.
trace.putMetric('hits', 1);
Name of the metric to set. Must not have a leading or trailing whitespace, no leading underscore '_' character and have a max length of 32 characters.
The value the metric should be set to.
Trace allows you to time the beginning to end of a certain action in your app with additional metric values and attributes.