Trace

actual class Trace(source)

Header stub; see FirebasePerformance.android.kt.

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

A custom trace: a period of time between start and stop that is reported with its metrics and custom attributes, as the Android SDK's com.google.firebase.perf.metrics.Trace.

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

An in-memory trace (see FirebasePerformance.jvm.kt); its operations are atomic, as the Android SDK's.

actual class Trace(source)

Types

Link copied to clipboard
actual object Companion
actual object Companion
expect object Companion
actual object Companion
actual object Companion
actual object Companion

Properties

Link copied to clipboard
actual val attributes: Map<String, String>
actual val attributes: Map<String, String>
expect val attributes: Map<String, String>

All custom attributes of this trace.

actual val attributes: Map<String, String>
actual val attributes: Map<String, String>
Link copied to clipboard
val ios: <Error class: unknown class>?

The underlying Firebase iOS SDK object; null when the iOS SDK refused the trace name.

Link copied to clipboard

The underlying Firebase JS SDK object.

The underlying Firebase JS SDK object.

Functions

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
open operator override fun equals(other: Any?): Boolean
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
actual fun getAttribute(attribute: String): String?
actual fun getAttribute(attribute: String): String?
expect fun getAttribute(attribute: String): String?

The value of the custom attribute attribute, or null if it is not set.

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

The value of the metric metricName, or 0 if it has not been set; the metric is not created.

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

Atomically increments the metric metricName by incrementBy, creating it if needed. Does nothing if the trace has not been started or has already been stopped.

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
actual fun putAttribute(attribute: String, value: String)
actual fun putAttribute(attribute: String, value: String)
expect fun putAttribute(attribute: String, value: String)

Sets the custom attribute attribute to value.

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

Sets the metric metricName to value, creating it if needed. Does nothing if the trace has not been started or has already been stopped.

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
actual fun removeAttribute(attribute: String)
actual fun removeAttribute(attribute: String)
expect fun removeAttribute(attribute: String)

Removes the custom attribute attribute.

actual fun removeAttribute(attribute: String)
actual fun removeAttribute(attribute: String)
actual fun removeAttribute(attribute: String)
Link copied to clipboard
actual fun start()
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()
actual fun stop()
expect fun stop()

Stops this trace and reports it.

actual fun stop()
actual fun stop()
actual fun stop()
Link copied to clipboard
open override fun toString(): String
open override fun toString(): String
open override fun toString(): String
open override fun toString(): String
Link copied to clipboard
inline fun <T> Trace.trace(block: Trace.() -> T): T

Runs block between Trace.start and Trace.stop of this trace and returns its result.

Link copied to clipboard
fun updateSession(session: PerfSession)

Android-only (hidden in the SDK's API); reached by the dev.gitlive wrapper's Trace.updateSession.