Skip to content

Commit

Permalink
collab: Add is_staff to upstream rate limit spans (#16463)
Browse files Browse the repository at this point in the history
This PR adds the `is_staff` field to the `upstream rate limit` spans.

Since we use different API keys for staff vs non-staff, it will be
useful to break down the rate limits accordingly.

Release Notes:

- N/A
  • Loading branch information
maxdeviant authored Aug 19, 2024
1 parent 56f1ab9 commit de41c15
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions crates/collab/src/llm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,7 @@ async fn perform_completion(
if let Some(rate_limit_info) = rate_limit_info {
tracing::info!(
target: "upstream rate limit",
is_staff = claims.is_staff,
provider = params.provider.to_string(),
model = model,
tokens_remaining = rate_limit_info.tokens_remaining,
Expand Down

0 comments on commit de41c15

Please sign in to comment.