Instrument Analyze with Duo usage

Follow-up to !255211 (merged) (merged). Was stacked on it during development, now targets master directly.

What does this MR do and why?

Context: !255211 (merged) added the "Analyze with Duo" button to the Explore analytics dashboards, with per-tab predefined prompts defined in dap_impact.yaml. We currently have no signal on whether anyone clicks the button or which prompts they pick.

Intent: measure adoption of the entry point and learn which prompts real users choose, so we can tune the prompt content from data.

Two internal events:

  • click_analyze_with_duo_on_analytics_dashboard: fires on button click. label is the scope type (group or project), value is the number of GLQL panel queries shared with the agent.
  • select_duo_agentic_chat_predefined_prompt: fires when a user clicks a predefined prompt chip in agentic chat. label is the prompt text (config-defined content, never user free text), property is the agent display name. Tracked centrally in the chat view, so it covers every surface that uses predefined prompts, not just this dashboard.

Service Ping metrics cover total counts and distinct users for both events. The events also flow to Snowplow with the properties above for ad hoc analysis.

Implementation notes:

  • The shared OpenAgenticChatButton widget now emits click, so callers can instrument without a deprecated .native listener.
  • Prompt text as label follows the click_dap_trial_or_paid_empty_state_prompt precedent. User-typed messages are not tracked.

References

Screenshots or screen recordings

No visual changes.

How to set up and validate locally

  1. Check out this branch.
  2. Open the DAP Impact dashboard under /explore/analytics_dashboards, select a scope, and click "Analyze with Duo" with the network tab filtered to Snowplow (or use the internal events debugger). A click_analyze_with_duo_on_analytics_dashboard event fires with the scope type and panel count.
  3. Click a predefined prompt chip in the chat. A select_duo_agentic_chat_predefined_prompt event fires with the prompt text and agent name.

MR acceptance checklist

This MR has been evaluated against the MR acceptance checklist.

Edited by Abhinaba Ghosh

Merge request reports

Loading
Loading