putMetric

actual fun putMetric(metricName: String, value: Long)(source)
expect fun putMetric(metricName: String, value: Long)(source)

Sets the value of the metric with the given name in this trace to the value provided. If a metric with the given name doesn't exist, a new one will be created. If the trace has not been started or has already been stopped, returns immediately without taking action. This method is atomic.

Parameters

metricName

Name of the metric to set. Requires no leading or trailing whitespace, no leading underscore '_' character, max length is 100 characters.

value

The value to which the metric should be set to.

actual fun putMetric(metricName: String, value: Long)(source)
actual fun putMetric(metricName: String, value: Long)(source)
actual fun putMetric(metricName: String, value: Long)(source)