HttpMetric

actual class HttpMetric(source)

Header stub; see FirebasePerformance.android.kt.

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

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

expect class HttpMetric(source)

A metric of one HTTP request, as the Android SDK's com.google.firebase.perf.metrics.HttpMetric. The JS SDK has no custom HTTP metrics (it records network requests itself), so this class exists on Android, the JVM and Apple platforms.

Types

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

Properties

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

All custom attributes of this metric.

actual val attributes: Map<String, String>

All custom attributes of this metric.

actual val attributes: Map<String, String>

All custom attributes of this metric.

expect val attributes: Map<String, String>

All custom attributes of this metric.

Link copied to clipboard
Link copied to clipboard

The value last given to setHttpResponseCode, or null.

Link copied to clipboard
val ios: FIRHTTPMetric

The underlying Firebase iOS SDK object.

Link copied to clipboard

The value last given to setRequestPayloadSize, or null.

Link copied to clipboard

The value last given to setResponseContentType, or null.

Link copied to clipboard

The value last given to setResponsePayloadSize, or null.

Link copied to clipboard
val url: String

The request URL.

Functions

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

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.

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

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.

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

expect fun removeAttribute(attribute: String)

Removes the custom attribute attribute.

Link copied to clipboard
actual fun setHttpResponseCode(responseCode: Int)

Sets the HTTP response status code.

actual fun setHttpResponseCode(responseCode: Int)

Sets the HTTP response status code.

actual fun setHttpResponseCode(responseCode: Int)

Sets the HTTP response status code.

expect fun setHttpResponseCode(responseCode: Int)

Sets the HTTP response status code.

Link copied to clipboard
actual fun setRequestPayloadSize(bytes: Long)

Sets the size of the request payload in bytes.

actual fun setRequestPayloadSize(bytes: Long)

Sets the size of the request payload in bytes.

actual fun setRequestPayloadSize(bytes: Long)

Sets the size of the request payload in bytes.

expect fun setRequestPayloadSize(bytes: Long)

Sets the size of the request payload in bytes.

Link copied to clipboard
actual fun setResponseContentType(contentType: String?)

Sets the content type of the response.

actual fun setResponseContentType(contentType: String?)

Sets the content type of the response.

actual fun setResponseContentType(contentType: String?)

Sets the content type of the response.

expect fun setResponseContentType(contentType: String?)

Sets the content type of the response.

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

Sets the size of the response payload in bytes.

actual fun setResponsePayloadSize(bytes: Long)

Sets the size of the response payload in bytes.

actual fun setResponsePayloadSize(bytes: Long)

Sets the size of the response payload in bytes.

expect fun setResponsePayloadSize(bytes: Long)

Sets the size of the response payload in bytes.

Link copied to clipboard
actual fun start()

Marks the start of the request.

actual fun start()

Marks the start of the request.

actual fun start()

Marks the start of the request.

expect fun start()

Marks the start of the request.

Link copied to clipboard
actual fun stop()

Marks the end of the response and reports the metric.

actual fun stop()

Marks the end of the response and reports the metric.

actual fun stop()

Marks the end of the response and reports the metric.

expect fun stop()

Marks the end of the response and reports the metric.

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