NetworkTransactionRecorder

class NetworkTransactionRecorder(factory: NetworkCaptureFactory, store: NetworkTransactionStore, enabled: Boolean = true, idProvider: () -> String = { UUID.randomUUID().toString() }, maxQueueSize: Int = DEFAULT_MAX_QUEUE_SIZE, executor: Executor = DEFAULT_EXECUTOR, maxQueuedBytes: Long = DEFAULT_MAX_QUEUED_BYTES)

Bridges redacted capture to the bounded transaction store without affecting host behavior. When enabled is false, record returns immediately without building a capture or touching store — the disabled build never redacts, serializes, or stores a payload. Processing (URL parsing, redaction, and store persistence) is offloaded asynchronously from caller threads via a bounded queue (drop-oldest strategy on overflow).

Constructors

Link copied to clipboard
constructor(factory: NetworkCaptureFactory, store: NetworkTransactionStore, enabled: Boolean = true, idProvider: () -> String = { UUID.randomUUID().toString() }, maxQueueSize: Int = DEFAULT_MAX_QUEUE_SIZE, executor: Executor = DEFAULT_EXECUTOR, maxQueuedBytes: Long = DEFAULT_MAX_QUEUED_BYTES)

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
Link copied to clipboard
fun record(request: NetworkRequestInput, response: NetworkResponseInput?, startedAtEpochMs: Long, completedAtEpochMs: Long?)
Link copied to clipboard

Installs the capture-exclusion gate; without one every enabled recording is captured.

Link copied to clipboard