Add internal events for the AI Governance dashboard and audit report

Adds frontend internal events for the AI Governance dashboard and the AI audit events report, so the beta review can see how often the dashboard is viewed, which cards get clicked, and what people do on the report. No user-facing change.

What we track, and where

Each number in the screenshots matches a row below. All events carry the user, namespace and project identifiers.

# Page The user Event label / property
1 Dashboard Opens the Dashboard tab view_ai_governance_dashboard -
2 Dashboard Clicks a row in Most recent sessions, Most used agents, Most active developers using agents, or Projects with the most active agent sessions click_card_link_on_ai_governance_dashboard label: audit_trail, agent_inventory, developer_activity or project_exposure, property: row
3 Dashboard Clicks the "View all" link on one of those cards or on MCP servers click_card_link_on_ai_governance_dashboard label: the card as in 2, or mcp_servers, property: view_all
4 AI audit events report Submits a search apply_filter_on_ai_audit_events_report one per filter added or changed since the last search, label: created_after, created_before, project, triggered_by or agent
5 AI audit events report Opens a session row open_session_on_ai_audit_events_report -
6 AI audit events report Clicks a user or project link click_linked_item_on_ai_audit_events_report label: user or project, property: table
7 AI audit events report Goes to the next or previous page paginate_ai_audit_events_report label: next or prev
8 Session drawer Opens an audit event open_audit_event_on_ai_audit_events_report -
9 Session drawer Clicks an author link click_linked_item_on_ai_audit_events_report label: user, property: drawer

Not tracked: filters that come from the URL (including on later searches), filters already counted in the previous search, and a deep link that opens the drawer.

Dashboard

1-dashboard

  • 1 Opens the tab: view_ai_governance_dashboard
  • 2 Clicks a row in a card: click_card_link_on_ai_governance_dashboard, property row
  • 3 Clicks a "View all" link: click_card_link_on_ai_governance_dashboard, property view_all

AI audit events report

2-report

  • 4 Submits a search: apply_filter_on_ai_audit_events_report, one per filter added or changed since the last search
  • 5 Opens a session row: open_session_on_ai_audit_events_report
  • 6 Clicks a user or project link: click_linked_item_on_ai_audit_events_report, property table
  • 7 Goes to the next or previous page: paginate_ai_audit_events_report

Session drawer

3-drawer

  • 8 Opens an audit event: open_audit_event_on_ai_audit_events_report
  • 9 Clicks an author link: click_linked_item_on_ai_audit_events_report, label user, property drawer

How to review

  • Start with the table and screenshots above.
  • ee/config/events/ (7 files): one definition per event, all the same shape.
  • ee/config/metrics/counts_all/ (34 files): a total count and a unique-user count per event (14), plus the same two per card label (10) and per filter label (10). They differ only in event, label and time frame.
  • Vue and JS (11 files): where each event fires. dashboard_app.vue sends the view event. The card components put data-event-* attributes on row links, and the view-all link gets them through a new tracking-label prop on dashboard_list_card.vue. The agent_artifacts_* and session_audit_events_list.vue components send the report events.
  • Specs (11 files).

How the data team derives each metric

Derived in Tableau from the events above, each joined per user and tracker session; none is computed in code.

  • Stage 1 to 2 conversion: users with click_card_link_on_ai_governance_dashboard over users with view_ai_governance_dashboard.
  • Stage 2 to 3 conversion: card clickers who then fire any report event (apply_filter, open_session, open_audit_event, paginate, click_linked_item on the report).
  • Repeat use: the 7-day and 28-day unique-user metrics on the view event (WAU, MAU), and the share of viewers seen again within 7 and 30 days.
  • Time to answer: median time from view_ai_governance_dashboard to the first open_audit_event_on_ai_audit_events_report in the same session.
  • Investigations per week: per user per week, a card click followed by an audit event opened.

Out of scope

  • Clicks on the four cards behind their own feature flags (Which AI agents developers are using, Most risky skills, Top tools used by agents, Tool calls by risk). We will add them in a follow-up with the same pattern.
  • The events are not classified duo: that classification is reserved for AI feature events whose data is operational, so Self-Managed instances that opted out of product analytics report none of these.
  • The derived metrics above, computed by the data team from these events.
  • Export events, until the report has an export.
  • A sort event: the report has no sort control on master.
  • The Tableau dashboard.

Verification

  • No screenshots: no visible UI changes.
  • Jest: 11 suites, 323 tests pass (10 extended suites plus the new dashboard_list_card_spec.js).
  • Event and metric definition validation (spec/lib/gitlab/tracking/event_definition_spec.rb, ee/spec/config/metrics/every_metric_definition_spec.rb): 17 examples, 0 failures. The 34 metric files also pass config/metrics/schema/base.json directly.
  • ESLint and Prettier clean on the touched files. No new translatable strings.
  • #630644+
  • #633507+
Edited by Dheeraj Joshi

Merge request reports

Loading
Loading