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

Auto generated

The following discussion from !902 (merged) should be addressed:

  • @shinya.maeda started a discussion: (+17 comments)

    Suggestion: This context is required, however, most of the times we can't add extra information such as is_gitlab_team_member because 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_event should be callable with minimal code. InternalEventsClient should be responsible of generating a structured event with the available information i.e. implicit context data collected at middleware + explicit args specified to the track_event method. 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: InternalEventAdditionalProperties should be optional param as well.