collab: Add context to errors syncing billing events to Stripe (#19315)

This PR adds context to errors that occur when trying to sync billing
events to Stripe.

Release Notes:

- N/A
This commit is contained in:
Marshall Bowers 2024-10-16 17:09:26 -04:00 committed by GitHub
parent 4288096ca1
commit fedd177b08
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -748,6 +748,7 @@ pub fn sync_llm_usage_with_stripe_periodically(app: Arc<AppState>) {
loop { loop {
sync_with_stripe(&app, &llm_db, &stripe_billing) sync_with_stripe(&app, &llm_db, &stripe_billing)
.await .await
.context("failed to sync LLM usage to Stripe")
.trace_err(); .trace_err();
executor.sleep(SYNC_LLM_USAGE_WITH_STRIPE_INTERVAL).await; executor.sleep(SYNC_LLM_USAGE_WITH_STRIPE_INTERVAL).await;
} }