Skip to main content

ConversationIdResolver

Type Alias ConversationIdResolver 

Source
pub type ConversationIdResolver = Arc<dyn Fn() -> Option<String> + Send + Sync>;
Expand description

Caller-supplied resolver for the conversation ID stamped on emitted events. Consulted on every emission; when it returns Some(id), that value wins over TelemetryHookConfig::conversation_id.

Use this when the host runtime threads a per-request conversation ID through e.g. a task-local, a tracing::Span field, or a request-scoped context object. The Rig PromptHook signature does not currently propagate a conversation ID; this is the escape hatch.

Aliased Typeยง

pub struct ConversationIdResolver { /* private fields */ }