Skip to main content

apply_anonymize_default

Function apply_anonymize_default 

Source
pub fn apply_anonymize_default(app_config: &AppConfig)
Expand description

Apply the configured anonymize_default to the runtime env: when the config asks for anonymization but the user hasn’t already set AI_MEMORY_ANONYMIZE, set it to "1". Idempotent — repeated calls are a no-op once the env var is set.

Note: this writes to the process environment; callers must invoke it from the single-threaded startup region (before any worker threads are spawned). The production binary calls it from main() for that reason.