collab: Attach additional properties to Language Model Used event (#21770)

This PR attaches two new properties to the `Language Model Used` event:

- `has_llm_subscription` - This will tell us if a user is a paid
subscriber.
- `max_monthly_spend_in_cents` - This will indicate what their maximum
monthly spend is set to.

Release Notes:

- N/A
This commit is contained in:
Marshall Bowers 2024-12-09 17:13:41 -05:00 committed by GitHub
parent bdeac79d48
commit 158cdc33ba
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -744,6 +744,8 @@ impl<S> Drop for TokenCountingStream<S> {
);
let properties = json!({
"has_llm_subscription": claims.has_llm_subscription,
"max_monthly_spend_in_cents": claims.max_monthly_spend_in_cents,
"plan": match claims.plan {
Plan::Free => "free".to_string(),
Plan::ZedPro => "zed_pro".to_string(),