Skip to content

Backend: Total event counts per user metrics

Summary

Add per-user metric for total event(s). This metric should be an aggregation of all Duo events tracked for a given user, in a given namespace.

Proposed Metrics

The event count should be available grouped by user and event. See #574400 (comment 2804219605)

Related Tracking Events

This metric should be derived from:

  • Clickhouse ai_usage_events table

Implementation details:

  • Create a custom connection type, example: performance_score_connection_type.rb
  • Create totalCount query (With deduplication) where users are grouped by the total number of events
  • Allow event filtering & namespace filtering. Same as in !206278 (merged)
  • Add specs

Related

This blocks Frontend: Add totalEventCount to User metrics t... (#574426) • Unassigned • 18.7

Edited by Amr Taha