# UpdateCheckTelemetry

Artifact: [androidx.security:security-state-provider](https://developer.android.com/jetpack/androidx/releases/security) [View Source](https://cs.android.com/search?q=file:androidx/security/state/provider/UpdateCheckTelemetry.kt+class:androidx.security.state.provider.UpdateCheckTelemetry) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/security#1.0.0)

*** ** * ** ***


```
class UpdateCheckTelemetry
```

<br />

*** ** * ** ***

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 `https://developer.android.com/reference/kotlin/androidx/security/state/provider/UpdateInfoService#onRequestCompleted(androidx.security.state.provider.UpdateCheckTelemetry)` hook to enable monitoring of latency, resource contention, and client usage.

This class is immutable.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/security/state/provider/UpdateCheckTelemetry#UpdateCheckTelemetry(kotlin.Int,kotlin.Long,kotlin.Long,kotlin.Long,kotlin.Long,kotlin.Int)( outcome: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, totalDurationMillis: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html, lockWaitDurationMillis: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html, processingDurationMillis: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html, fetchDurationMillis: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html, callerUid: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html )` |

| ### Public functions |
|---|---|
| `open operator https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/security/state/provider/UpdateCheckTelemetry#equals(kotlin.Any)(other: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?)` |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/security/state/provider/UpdateCheckTelemetry#hashCode()()` |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/security/state/provider/UpdateCheckTelemetry#toString()()` |

| ### Public properties |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/security/state/provider/UpdateCheckTelemetry#callerUid()` The Android User ID (UID) of the client application that initiated this request. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | `https://developer.android.com/reference/kotlin/androidx/security/state/provider/UpdateCheckTelemetry#fetchDurationMillis()` The time (in milliseconds) spent waiting for the network fetch implementation to complete. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | `https://developer.android.com/reference/kotlin/androidx/security/state/provider/UpdateCheckTelemetry#lockWaitDurationMillis()` The time (in milliseconds) spent waiting for the concurrency lock. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/security/state/provider/UpdateCheckTelemetry#outcome()` The outcome of the update check request. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | `https://developer.android.com/reference/kotlin/androidx/security/state/provider/UpdateCheckTelemetry#processingDurationMillis()` The time (in milliseconds) spent processing the request **after acquiring the concurrency lock**. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | `https://developer.android.com/reference/kotlin/androidx/security/state/provider/UpdateCheckTelemetry#totalDurationMillis()` 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](https://developer.android.com/jetpack/androidx/releases/security#1.0.0)

```
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](https://developer.android.com/jetpack/androidx/releases/security#1.0.0)

```
val callerUid: Int
```

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

This value is captured at the start of the transaction via `https://developer.android.com/reference/kotlin/androidx/security/state/provider/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](https://developer.android.com/jetpack/androidx/releases/security#1.0.0)

```
val fetchDurationMillis: Long
```

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

This is a subset of `https://developer.android.com/reference/kotlin/androidx/security/state/provider/UpdateCheckTelemetry#(kotlin.Int,kotlin.Long,kotlin.Long,kotlin.Long,kotlin.Long,kotlin.Int)` that strictly measures the duration of the `https://developer.android.com/reference/kotlin/androidx/security/state/provider/UpdateInfoService#fetchUpdates()` call, excluding local persistence and serialization overhead.

This value is 0 if no network fetch was attempted (e.g. for `https://developer.android.com/reference/kotlin/androidx/security/state/provider/UpdateFetchOutcome#CACHE_HIT()` or `https://developer.android.com/reference/kotlin/androidx/security/state/provider/UpdateFetchOutcome#THROTTLED()`, or `https://developer.android.com/reference/kotlin/androidx/security/state/provider/UpdateFetchOutcome#COALESCED()`).

### lockWaitDurationMillis

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/security#1.0.0)

```
val lockWaitDurationMillis: Long
```

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](https://developer.android.com/jetpack/androidx/releases/security#1.0.0)

```
val outcome: Int
```

The outcome of the update check request.

Value is one of the constants allowed by `https://developer.android.com/reference/kotlin/androidx/security/state/provider/UpdateFetchOutcome.Code`, such as `https://developer.android.com/reference/kotlin/androidx/security/state/provider/UpdateFetchOutcome#CACHE_HIT()`.

### processingDurationMillis

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/security#1.0.0)

```
val processingDurationMillis: Long
```

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

- This metric excludes the time spent waiting for the lock (`https://developer.android.com/reference/kotlin/androidx/security/state/provider/UpdateCheckTelemetry#(kotlin.Int,kotlin.Long,kotlin.Long,kotlin.Long,kotlin.Long,kotlin.Int)`).

- For `https://developer.android.com/reference/kotlin/androidx/security/state/provider/UpdateFetchOutcome#FETCHED()`, this includes the network request duration and disk persistence time.

- For `https://developer.android.com/reference/kotlin/androidx/security/state/provider/UpdateFetchOutcome#CACHE_HIT()`, this represents the time to read from local storage.

- For `https://developer.android.com/reference/kotlin/androidx/security/state/provider/UpdateFetchOutcome#COALESCED()`, this represents the minimal time spent reading the freshly updated cache after the lock was acquired.

### totalDurationMillis

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/security#1.0.0)

```
val totalDurationMillis: Long
```

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.