collab: Add is_staff to upstream rate limit spans (#16463)

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
This commit is contained in:
Marshall Bowers 2024-08-19 10:15:25 -04:00 committed by GitHub
parent 56f1ab9459
commit de41c151c8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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,