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.labelis the scope type (grouporproject),valueis 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.labelis the prompt text (config-defined content, never user free text),propertyis 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
OpenAgenticChatButtonwidget now emitsclick, so callers can instrument without a deprecated.nativelistener. - Prompt text as
labelfollows theclick_dap_trial_or_paid_empty_state_promptprecedent. User-typed messages are not tracked.
References
- Parent MR: !255211 (merged)
Screenshots or screen recordings
No visual changes.
How to set up and validate locally
- Check out this branch.
- 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). Aclick_analyze_with_duo_on_analytics_dashboardevent fires with the scope type and panel count. - Click a predefined prompt chip in the chat. A
select_duo_agentic_chat_predefined_promptevent fires with the prompt text and agent name.
MR acceptance checklist
This MR has been evaluated against the MR acceptance checklist.