record_gen_ai_response_attrs

Function record_gen_ai_response_attrs 

Source
pub fn record_gen_ai_response_attrs(
    span: &Span,
    response_model: Option<&str>,
    prompt_tokens: Option<u64>,
    completion_tokens: Option<u64>,
    total_tokens: Option<u64>,
    finish_reasons: &[&str],
    response_id: Option<&str>,
)
Expand description

Record the response-side OTel GenAI semantic-convention attributes (AI-07) onto an AI span. Each argument is recorded only when present (provider-reported only; the gateway never estimates). finish_reasons is the per-choice finish-reason token list (one entry per choice).