software-mansion / setup-ci

CLI to spin your CI/CD for react-native!
MIT License
160 stars 1 forks source link

Add analytics to monitor which features are used the most #121

Closed maciekstosio closed 1 month ago

maciekstosio commented 1 month ago

It would be good to gather some analytics. At this point, I'm thinking about sending selected options and if it's the first time used or consecutive - that shouldn't require us any consent from the user - to confirm. It would be good to decide if we want to use SAS or self-hosted simple server. If we're going for self self-hosted solution I would just create supabase project. That would allow us to set it up really fast.

km1chno commented 1 month ago

My proposition:

How

Telemetry object (what is collected)

{
    timestamp: string, // perhaps in UTC
    version: string, // setup-ci version
    env: {
        os: string, // only (mac|linux|window) or with (kernel) version
        expo: boolean // true iff project is expo
    },
    firstUse: boolean, // true iff setup-ci has not been run in the project yet
    args: string[], // cli arguments
    recipe: {
        // object representing what was selected by the user
        // or evaluated from provided cli arguments
        main: string[], // processes for main branch
        feature: string[], // ... for feature branch
        release: string[]  // ... for release branch
    },
    error?: string // only if occurred
}