smonitor.diagnostic_scope#

smonitor.diagnostic_scope(policy=CapturePolicy(arguments=False, exception_text=False, inherited_context=False, extra=False), *, safe_extra=None)[source]#

Restrict capture locally; token restoration works across awaits and errors.

Safe facts are caller-approved, bounded primitives, not a redaction service. Place this scope before any provider call whose automatic collection is forbidden.

Parameters:

policy (CapturePolicy)