Add CLI support for AI Gateway analytics instrumentation
Overview
Add CLI support for AI Gateway to enable easier event and metric definition generation for the AI Gateway project.
Key Discussion Points from Epic
Current State
- AI Gateway currently has ~63 events instrumented but only ~5 event definitions are visible in metrics.gitlab.com
- This is mainly because there's no CLI support in the AI Gateway repo
- AI Gateway uses the internal_events_client and sends events directly to Snowplow without verification
Proposed Approach
Based on the epic discussion, the solution involves:
-
CLI Support - Enable the CLI to work with AI Gateway's
config/eventsdirectory structure - Documentation & Examples - Add Python examples and documentation for AI Gateway developers
- Enable MR Reviews - Set up analytics instrumentation review bot for AI Gateway
Technical Considerations
- AI Gateway is a Python project, so the CLI should be language-agnostic
- Event definitions should follow the convention of being stored in
config/eventsfolder - The CLI should validate event definitions against AI Gateway's schema requirements
- Different projects may have different validation requirements (e.g., milestones may not be relevant for AI Gateway)
Edited by 🤖 GitLab Bot 🤖