Migrate from legacy SnowplowClient to Internal Event client
Problem
In Track a product usage event with the new standa... (#491 - closed), we introduced a new Internal Event client for tracking GitLab Internal Events. This is used for tracking product usage, such as unit primitive usage per organization.
OTOH, we're still using legacy SnowplowClient for Code Suggestions/Generation dashboard. This should be replaced by the Internal Event.
Proposal
- Make sure that the Code Suggestion / Generation dashboards are covered by the Internal Events.
- Deprecate and remove the legacy
SnowplowClient. - Stop sending
X-Gitlab-Saas-Duo-Pro-Namespace-Idsfrom clients.
Auto generated
The following discussion from !902 (merged) should be addressed:
-
@shinya.maeda started a discussion: (+17 comments)
Suggestion: This
contextis required, however, most of the times we can't add extra information such asis_gitlab_team_memberbecause AI Gateway doesn't know. In addition, it shouldn't be set at a caller but it should be set at middleware.From AI Gateway maintainer perspective, a preferable interface would be:
track_eventshould be callable with minimal code.InternalEventsClientshould be responsible of generating a structured event with the available information i.e. implicit context data collected at middleware + explicit args specified to thetrack_eventmethod. Explicitly specified args should be able to override the implicit values.- It should be closer to the Ruby client. This allows us to read the existing Internal Event documentation to understand the overall architecture. In that sense,
additional_properties: InternalEventAdditionalPropertiesshould be optional param as well.