record

fun record(request: NetworkRequestInput, response: NetworkResponseInput?, startedAtEpochMs: Long, completedAtEpochMs: Long?)


fun record(request: NetworkRequestInput, response: NetworkResponseInput?, startedAtEpochMs: Long, completedAtEpochMs: Long?, transactionId: String?)

Same as the four-argument record, but stores the transaction under the caller-supplied transactionId instead of a freshly generated one (null keeps the generated id). Recording the same id again replaces the earlier stored transaction -- the NetworkTransactionStore.record contract -- which is how an adapter first records a provisional metadata-only transaction for a still-streaming response and later upgrades it in place with the captured body, without ever showing two entries for one HTTP call.

Each early return below is a distinct drop reason (gate rejection, single item over budget, still-full queue after one eviction) that reads far more clearly as a guard clause than folded into one boolean expression.