[refactor]: Move telemetry check to GitLabPlatform

We want to apply two refactorings to make the Snowplow telemetry set up easier to test and maintain:

  • Verify if telemetry is enabled from GitLabPlatorm
  • Remove the singleton logic from the Snowplow class

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

  • @pslaughter started a discussion: (+1 comment)

    thought (non-blocking): Maybe we want to handle this in a follow-up, but I think it might be nice for us to move this isTelemetryEnabled function over to GitLabPlatformManager so that we can keep setupTelemetry in the activateCommon and only move the Web IDE specific stuff in the browser/platform.

Availability and Testing

Ensure updated test coverage in unit/integration/feature tests.

Edited by Nivetha Prabakaran