You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Successful Gemini proxy requests through the desktop Rust backend do NOT log the user UID. Only rate-limited (429), model-degraded, and BYOK-usage paths log uid=. This blocks per-user cost attribution for Vertex AI spend.
Impact: cannot attribute $16K/mo Vertex AI cost to specific users from logs alone. 50 unique users made 567K successful requests in May — all unattributable.
Code location
desktop/Backend-Rust/src/routes/proxy.rs — gemini_proxy and gemini_stream_proxy handlers
Lines 125-291 (non-streaming), 319-472 (streaming): no tracing call on the success path between rate limit check and upstream response forwarding
Existing logging pattern (for reference)
// Already logged on rejection/degradation:
tracing::warn!("gemini_proxy: rate limit rejected uid={}", user.uid); // line 125
tracing::info!("gemini_proxy: degraded uid={} {} -> {}", user.uid, ...); // line 132
tracing::info!("gemini_proxy: using BYOK Gemini key for uid={}", user.uid); // line 152
Proposed fix
Add one tracing::info! after the successful upstream response, in both gemini_proxy and gemini_stream_proxy:
Activity