HttpMetric

actual class HttpMetric(source)

Header stub; see FirebasePerformance.android.kt.

actual class HttpMetric(source)
expect class HttpMetric(source)

A metric of one HTTP request, as the Android SDK's com.google.firebase.perf.metrics.HttpMetric; created with com.google.firebase.perf.FirebasePerformance.newHttpMetric. The JS SDK has no custom HTTP metrics (it records network requests itself), so on JS and wasmJs the metric keeps its attributes and values but reports nothing.

actual class HttpMetric(source)

An HTTP metric that keeps its attributes and values but reports nothing: the JS SDK has no custom HTTP metrics.

actual class HttpMetric(source)

An in-memory HTTP metric (see FirebasePerformance.jvm.kt).

actual class HttpMetric(source)

An HTTP metric that keeps its attributes and values but reports nothing: the JS SDK has no custom HTTP metrics.

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 metric.

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 performance collection is disabled, which the iOS SDK reports with no metric.

Functions

Link copied to clipboard
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
open override fun hashCode(): Int
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 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 setHttpResponseCode(responseCode: Int)
actual fun setHttpResponseCode(responseCode: Int)
expect fun setHttpResponseCode(responseCode: Int)

Sets the HTTP response status code.

actual fun setHttpResponseCode(responseCode: Int)
actual fun setHttpResponseCode(responseCode: Int)
actual fun setHttpResponseCode(responseCode: Int)
Link copied to clipboard
actual fun setRequestPayloadSize(bytes: Long)
actual fun setRequestPayloadSize(bytes: Long)
expect fun setRequestPayloadSize(bytes: Long)

Sets the size of the request payload in bytes.

actual fun setRequestPayloadSize(bytes: Long)
actual fun setRequestPayloadSize(bytes: Long)
actual fun setRequestPayloadSize(bytes: Long)
Link copied to clipboard
actual fun setResponseContentType(contentType: String?)
actual fun setResponseContentType(contentType: String?)
expect fun setResponseContentType(contentType: String?)

Sets the content type of the response.

actual fun setResponseContentType(contentType: String?)
actual fun setResponseContentType(contentType: String?)
actual fun setResponseContentType(contentType: String?)
Link copied to clipboard
actual fun setResponsePayloadSize(bytes: Long)
actual fun setResponsePayloadSize(bytes: Long)
expect fun setResponsePayloadSize(bytes: Long)

Sets the size of the response payload in bytes.

actual fun setResponsePayloadSize(bytes: Long)
actual fun setResponsePayloadSize(bytes: Long)
actual fun setResponsePayloadSize(bytes: Long)
Link copied to clipboard
actual fun start()
actual fun start()
expect fun start()

Marks the start of the request.

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

Marks the end of the response and reports the metric.

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 HttpMetric.trace(block: HttpMetric.() -> Unit)

Runs block between HttpMetric.start and HttpMetric.stop of this metric.