Utils class

Constructors

Utils()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

applyPayloadLimit(String? payload) String?
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.
buildCaptureContext({required String url, required List<CxNetworkCaptureRule> rules, required Map<String, String> reqHeaders, Map<String, String>? resHeaders, String? requestPayload, String? responsePayload}) Map<String, dynamic>
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.
filterHeaders(Map<String, String> headers, List<String> allowlist) Map<String, String>
Filters headers to only those whose name (case-insensitive) appears in allowlist. Output keys use the casing from allowlist (mirrors Android SDK behaviour).
generateHex(int length) String
Generates a hex string of length characters using a cryptographically secure RNG.
resolveNetworkCaptureRule(String url, List<CxNetworkCaptureRule> rules) CxNetworkCaptureRule?
Returns the first CxNetworkCaptureRule whose url exactly matches or whose urlPattern regex matches url. Returns null if no rule matches.
shouldAddTraceParent(String? requestURLString, CXExporterOptions options) bool