Trace

actual class Trace(source)
expect class Trace(source)

Trace allows you to set beginning and end of a certain action in your app.

actual class Trace(source)
actual class Trace(source)
actual class Trace(source)

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard
val Trace.android: Trace
Link copied to clipboard
val Trace.ios: FIRTrace?
Link copied to clipboard
val Trace.js: PerformanceTrace

Functions

Link copied to clipboard
fun getAttribute(attribute: String): String?
fun getAttribute(attribute: String): String?
Link copied to clipboard
Link copied to clipboard
actual fun getLongMetric(metricName: String): Long
expect fun getLongMetric(metricName: String): Long

Gets the value of the metric with the given name in the current trace. If a metric with the given name doesn't exist, it is NOT created and a 0 is returned. This method is atomic.

actual fun getLongMetric(metricName: String): Long
actual fun getLongMetric(metricName: String): Long
actual fun getLongMetric(metricName: String): Long
Link copied to clipboard
actual fun incrementMetric(metricName: String, incrementBy: Long)
expect fun incrementMetric(metricName: String, incrementBy: Long)

Atomically increments the metric with the given name in this trace by the incrementBy value. If the metric does not exist, a new one will be created. If the trace has not been started or has already been stopped, returns immediately without taking action.

actual fun incrementMetric(metricName: String, incrementBy: Long)
actual fun incrementMetric(metricName: String, incrementBy: Long)
actual fun incrementMetric(metricName: String, incrementBy: Long)
Link copied to clipboard
fun putAttribute(attribute: String, value: String)
fun putAttribute(attribute: String, value: String)
Link copied to clipboard
actual fun putMetric(metricName: String, value: Long)
expect fun putMetric(metricName: String, value: Long)

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.

actual fun putMetric(metricName: String, value: Long)
actual fun putMetric(metricName: String, value: Long)
actual fun putMetric(metricName: String, value: Long)
Link copied to clipboard
fun removeAttribute(attribute: String)
fun removeAttribute(attribute: String)
Link copied to clipboard
actual fun start()
expect fun start()

Starts this trace.

actual fun start()
actual fun start()
actual fun start()
Link copied to clipboard
actual fun stop()
expect fun stop()

Stops this trace.

actual fun stop()
actual fun stop()
actual fun stop()
Link copied to clipboard