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). @property name The name given to com.google.firebase.perf.FirebasePerformance.newTrace.

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>

All custom attributes of this trace.

actual val attributes: Map<String, String>

All custom attributes of this trace.

expect val attributes: Map<String, String>

All custom attributes of this trace.

actual val attributes: Map<String, String>

All custom attributes of this trace.

actual val attributes: Map<String, String>

All custom attributes of this trace.

actual val attributes: Map<String, String>

All custom attributes of this trace.

Link copied to clipboard
val ios: FIRTrace?

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.

Link copied to clipboard

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?

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

actual fun getAttribute(attribute: String): String?

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

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?

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

actual 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?

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

Link copied to clipboard
actual 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

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

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

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

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

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

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)

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)

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.

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)

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)

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)

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.

Link copied to clipboard
actual fun putAttribute(attribute: String, value: String)

Sets the custom attribute attribute to value.

actual fun putAttribute(attribute: String, value: String)

Sets the custom attribute attribute to value.

expect fun putAttribute(attribute: String, value: String)

Sets the custom attribute attribute to value.

actual fun putAttribute(attribute: String, value: String)

Sets the custom attribute attribute to value.

actual fun putAttribute(attribute: String, value: String)

Sets the custom attribute attribute to value.

actual fun putAttribute(attribute: String, value: String)

Sets the custom attribute attribute to value.

Link copied to clipboard
actual 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)

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

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)

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)

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)

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

Link copied to clipboard
actual fun removeAttribute(attribute: String)

Removes the custom attribute attribute.

actual fun removeAttribute(attribute: String)

Removes the custom attribute attribute.

expect fun removeAttribute(attribute: String)

Removes the custom attribute attribute.

actual fun removeAttribute(attribute: String)

Removes the custom attribute attribute.

actual fun removeAttribute(attribute: String)

Removes the custom attribute attribute.

actual fun removeAttribute(attribute: String)

Removes the custom attribute attribute.

Link copied to clipboard
actual fun start()

Starts this trace.

actual fun start()

Starts this trace.

expect fun start()

Starts this trace.

actual fun start()

Starts this trace.

actual fun start()

Starts this trace.

actual fun start()

Starts this trace.

Link copied to clipboard
actual fun stop()

Stops this trace and reports it.

actual fun stop()

Stops this trace and reports it.

expect fun stop()

Stops this trace and reports it.

actual fun stop()

Stops this trace and reports it.

actual fun stop()

Stops this trace and reports it.

actual fun stop()

Stops this trace and reports it.

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 Kotlin-first wrapper's Trace.updateSession.