UpdateCheckTelemetry


class UpdateCheckTelemetry


Detailed telemetry data for a completed update check request.

This class encapsulates performance metrics and attribution data for a single invocation of the update check logic. It is provided to the host application via the UpdateInfoService.onRequestCompleted hook to enable monitoring of latency, resource contention, and client usage.

This class is immutable.

Summary

Public constructors

UpdateCheckTelemetry(
    outcome: Int,
    totalDurationMillis: Long,
    lockWaitDurationMillis: Long,
    processingDurationMillis: Long,
    fetchDurationMillis: Long,
    callerUid: Int
)

Public functions

open operator Boolean
equals(other: Any?)
open Int
open String

Public properties

Int

The Android User ID (UID) of the client application that initiated this request.

Long

The time (in milliseconds) spent waiting for the network fetch implementation to complete.

Long

The time (in milliseconds) spent waiting for the concurrency lock.

Int

The outcome of the update check request.

Long

The time (in milliseconds) spent processing the request after acquiring the concurrency lock.

Long

The total wall-clock time (in milliseconds) elapsed from the start of the request until the result was returned.

Public constructors

UpdateCheckTelemetry

Added in 1.0.0-alpha02
UpdateCheckTelemetry(
    outcome: Int,
    totalDurationMillis: Long,
    lockWaitDurationMillis: Long,
    processingDurationMillis: Long,
    fetchDurationMillis: Long,
    callerUid: Int
)

Public functions

equals

open operator fun equals(other: Any?): Boolean

hashCode

open fun hashCode(): Int

toString

open fun toString(): String

Public properties

callerUid

Added in 1.0.0-alpha02
val callerUidInt

The Android User ID (UID) of the client application that initiated this request.

This value is captured at the start of the transaction via UpdateInfoService.getCallerUid.

  • Default: Represents the physical IPC caller (Binder.getCallingUid()).

  • Proxied: If the host application overrides getCallerUid (e.g., to support a service broker architecture), this represents the logical client identity provided by that implementation.

Usage: Hosts should use this field to attribute resource usage, latency, and throttling events to specific client applications (e.g., differentiating between the System Settings app and a background telemetry agent).

fetchDurationMillis

Added in 1.0.0-alpha02
val fetchDurationMillisLong

The time (in milliseconds) spent waiting for the network fetch implementation to complete.

This is a subset of processingDurationMillis that strictly measures the duration of the UpdateInfoService.fetchUpdates call, excluding local persistence and serialization overhead.

This value is 0 if no network fetch was attempted (e.g. for UpdateFetchOutcome.CACHE_HIT or UpdateFetchOutcome.THROTTLED, or UpdateFetchOutcome.COALESCED).

lockWaitDurationMillis

Added in 1.0.0-alpha02
val lockWaitDurationMillisLong

The time (in milliseconds) spent waiting for the concurrency lock.

A high value here indicates "thundering herd" contention, where multiple clients are requesting updates simultaneously, causing threads to block while waiting for an in-progress fetch to complete.

outcome

Added in 1.0.0-alpha02
val outcomeInt

The outcome of the update check request.

Value is one of the constants allowed by UpdateFetchOutcome.Code, such as UpdateFetchOutcome.CACHE_HIT.

processingDurationMillis

Added in 1.0.0-alpha02
val processingDurationMillisLong

The time (in milliseconds) spent processing the request after acquiring the concurrency lock.

totalDurationMillis

Added in 1.0.0-alpha02
val totalDurationMillisLong

The total wall-clock time (in milliseconds) elapsed from the start of the request until the result was returned.

This represents the user-perceived latency of the IPC call.