NetworkRedactionMixin mixin
Mixin providing redaction utilities for network interceptors.
Implementing classes must provide logger, enableRedaction, and redactor.
Properties
- captureMode → DiagnosticCaptureMode
-
Capture policy for values crossing this interceptor boundary.
no setter
- enableRedaction → bool
-
Whether redaction is enabled for this interceptor.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- logger → ISpectLogger
-
The logger instance - needed for error reporting in safeRedact.
no setter
- redactor → RedactionService
-
The redaction service for this interceptor.
no setter
- resourceLimits → DiagnosticResourceLimits
-
Resource budgets resolved by the adapter or inherited from logger.
no setter
- 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
-
processMapData(
Map data, {required bool useRedaction}) → Map< String, dynamic> - Processes and redacts a map, ensuring string keys.
-
redactDiagnosticText(
String value, {required bool useRedaction}) → String - Returns bounded diagnostic text, failing closed when redaction fails.
-
redactUrl(
String url, {required bool useRedaction}) → String - Redacts query parameter values and userInfo credentials in a URL.
-
redactUrlAndPath(
Uri uri, {required bool useRedaction}) → ({String path, String url}) - Returns a bounded URL and path using the selected capture policy.
-
redactUrlSnapshot(
NetworkUriSnapshot snapshot, {required bool useRedaction}) → ({String path, String url}) - Redacts a URL snapshot whose provenance was established by its creator.
-
safeRedact(
Object data, {required bool useRedaction}) → Object - Applies redaction with error handling: logs a warning and returns a placeholder on failure instead of propagating the exception.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
- noRedactConfig → const ISpectTraceConfig
- Disables trace-pipeline redaction after the caller resolves Layer 1.