orRedacted

Same as orRedacted but with a ContentCapturePolicy instance taken from TracingManager.


Returns either the current string or "REDACTED" based on the provided content kind and content capture policy. The behavior depends on whether the policy allows capturing sensitive input or output content.

Return

The original string if the policy allows capturing the specified content kind; otherwise, "REDACTED".

Parameters

kind

Specifies the type of content (e.g., input or output) to evaluate.

policy

The content capture policy that determines redaction behavior.