Skip to main content

scope

Macro scope 

Source
macro_rules! scope {
    ($($key:ident : $value:expr),+ $(,)? => $body:expr) => { ... };
}
Expand description

Open a free-form context span carrying ad-hoc fields (sender id, message id, turn id, etc.) for every record! inside its scope. Use sparingly — prefer attribution_span!(thing) for role-bearing attribution. This is for transient per-scope identifiers that aren’t tied to an Attributable.

Field keys recognized by the layer: agent_alias, tool, session_key, cron_job_id, risk_profile, runtime_profile, memory_namespace, skill_bundle, knowledge_bundle, mcp_bundle, peer_group, sop_name, model, embedding_provider, channel, model_provider, tts_provider, transcription_provider, tunnel_provider. Anything else lands in event attributes.