Add a new internal event for Duo Chat request
What does this MR do and why?
This MR adds a new internal event for tracking Duo Chat requests on SaaS / SM / Dedicated instances.
See https://gitlab.com/gitlab-org/gitlab/-/issues/452316+ for more information.
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
Confirmed that the event is tracked in Redis HLL counter (Service Ping):
bin/rails runner scripts/internal_events/monitor.rb request_duo_chat
Updated at 2024-04-03 05:59:15 UTC
Monitored events: request_duo_chat
+----------------------------------------------------------------------------------------------------------------------------------------------------+
| RELEVANT METRICS |
+-------------------------------------------------------------------------+------------------+-----------------------+---------------+---------------+
| Key Path | Monitored Events | Instrumentation Class | Initial Value | Current Value |
+-------------------------------------------------------------------------+------------------+-----------------------+---------------+---------------+
| redis_hll_counters.count_distinct_user_id_from_request_duo_chat_response_monthly | request_duo_chat_response | RedisHLLMetric | 1 | 1 |
| redis_hll_counters.count_distinct_user_id_from_request_duo_chat_response_weekly | request_duo_chat_response | RedisHLLMetric | 1 | 1 |
+-------------------------------------------------------------------------+------------------+-----------------------+---------------+---------------+
How to set up and validate locally
To set up Duo Chat feature, see https://docs.gitlab.com/ee/development/ai_features/#local-setup.
Edited by Shinya Maeda