Create REST API endpoint to ingest AI usage telemetry

Summary

For AI Impact: Expose Code Suggestions Acceptance R... (#456088 - closed) • Pavel Shutsin • 17.2 and as part of #452173 (closed) we need an endpoint to consume telemetry events happening while user uses AI features. These events should be stored in clickhouse for further processing.

Suggested params for POST /api/v4/usage_data/track_event

  • event: string, one of (code_suggestion_accepted_in_ide, code_suggestion_rejected_in_ide, code_suggestion_shown_in_ide)
  • additional_properties[language] string, language of the suggestion
  • additional_properties[unique_tracking_id] string, unique UUID of the suggestion.
  • additional_properties[suggestion_size] number, number of LoC in the suggestion
  • additional_properties[timestamp] timestamp of the event
Edited by Pavel Shutsin