Skip to content

Commit

Permalink
Record request parameters in OTel span for /v1/chat/completions endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
aW3st committed Feb 7, 2025
1 parent 4b8cda6 commit b0e6698
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions router/src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1217,7 +1217,7 @@ example = json ! ({"error": "Incomplete generation"})),
#[instrument(
skip_all,
fields(
// parameters = ? req.parameters,
parameters,
total_time,
validation_time,
queue_time,
Expand All @@ -1243,7 +1243,7 @@ pub(crate) async fn chat_completions(
} = chat.clone();
let (generate_request, using_tools): (GenerateRequest, bool) =
chat.try_into_generate(&infer)?;

span.record("parameters", format!("{:?}", generate_request.parameters));
let logprobs = logprobs.unwrap_or_default();

// extract model id from request if specified
Expand Down

0 comments on commit b0e6698

Please sign in to comment.