Returns payload unchanged when its length is ≤ 1024 characters, or
null when it exceeds the limit. Bodies over the limit are dropped
entirely rather than truncated to avoid sending partial/misleading data.
Resolves the first matching CxNetworkCaptureRule for url and returns
a map of the capture-sensitive fields (request/response headers and
payloads) that should be included in a network telemetry span.
Filters headers to only those whose name (case-insensitive) appears in allowlist.
Output keys use the casing from allowlist (mirrors Android SDK behaviour).
Asks native for the sampled flag of a request starting now. Resolves to
null — send no header, echo nothing — when there is no answer: native
not initialized, the bridge failing, or no reply within
networkRequestSamplingTimeout. Never throws.
Reports a network request once its start-time sampling answer is in,
without holding up the caller. The answer is echoed so native records
the request in the session it started in.
Header-side rule only. Callers skip network instrumentation entirely when
it is switched off. Sampling deliberately plays no part: a sampled-out
session keeps propagating so backend traces still correlate.