Create Go SDK for Internal Events tracking in satellite services

Background

The Container Registry team (and other Go-based satellite services) need to implement Internal Events tracking to align with GitLab's analytics strategy. Currently, we have SDKs for Ruby and Python, but no Go implementation.

This is blocking:

Requirements

Core Functionality

Create a Go SDK that wraps the official Snowplow library (snowplow-golang-tracker) and provides:

  1. Simple tracker setup - Constructor similar to Ruby SDK example
  2. Event tracking API - Track method similar to Ruby SDK example
  3. User context support (optional) - Add actor/user to events using user_context schema

Technical Specifications

  • Base Library: snowplow-golang-tracker
  • Event Schema: Use custom_event schema for tracked properties
  • User Schema: Use user_context schema for user data (when applicable)
  • Location: Place in https://gitlab.com/gitlab-org/analytics-section/product-analytics group
  • Integration: Consider adding to https://gitlab.com/gitlab-org/labkit for shared use across Go services

Migration Compatibility

  • DIP Migration: Ensure SDK works with future DIP migration (only emitter URL needs to change)
  • Self-managed: Support both GitLab.com and self-managed instances

Reference Implementation

Use the Ruby SDK as the reference implementation. The functionality should be equivalent but adapted for Go patterns.

Acceptance Criteria

  • Go SDK created with wrapper around snowplow-golang-tracker
  • Simple constructor for tracker initialization
  • Event tracking method that accepts custom properties
  • Optional user context support
  • Documentation with usage examples
  • Compatible with future DIP migration
  • Placed in analytics-section/product-analytics group
  • Integration guidance for labkit (if applicable)

Timeline

This is needed to unblock Container Registry analytics implementation. Container Registry team is ready to help with implementation and testing.

Related Issues

/cc @nbelokolodov @tjayaramaraju @michold @adie.po

Edited by 🤖 GitLab Bot 🤖