AI Impact: collect Duo chat usage data

Problem

Engineering leadership (Director/VP/CTO) need to demonstrate the ROI 💰 from the investments in AI features. Today, the AI Impact include only the Monthly Code Suggestions Usage rate.

Also, customers need the ability to know how many chat queries are made and how many were useful.

Related to the AI Impact epic problem-to-solve

Proposal

  1. Adding a new metric to the formula for the AI Impact analytics - Duo Chat usage. Similar to [VSD] - Adding a new metric - "AI (Code Suggest... (#443696 - closed) • Pavel Shutsin • 16.11
  2. The formula for the new metric - (Monthly unique users of Duo Chat/ Monthly unique contributors) = Duo Chat usage.
  3. Collect the "Monthly unique users of Duo Chat" via request_duo_chat_response event.

Technical details

  1. Add new model Ai::ChatUsage and new event to AiTracking module.

Related information

For production we can't use Snowflake and service ping.

Edited by Pavel Shutsin