Skip to content

Remove extra and context from FE Internal event code and documentation

Ankit Panchal requested to merge 431188-remove-extra-context-from-fe into master

What does this MR do and why?

This MR removes context and extra attributes being added to Internal events. It also removes its current usages in the code.

We need to remove it now as Backend does not support it and it will create a confusion if FE supports and not BE supports the same.

More context in the issue - #431188 (closed)

How to set up and validate locally

  1. Enable snowplow micro locally.
  2. To test, context and extra is not being passed to internal events, add below code in https://gitlab.com/gitlab-org/gitlab/-/blob/master/app/assets/javascripts/tracking/index.js?ref_type=heads#L75 after InternalEvents.initBrowserSDK();
 InternalEvents.trackEvent('i_code_review_user_create_mr_from_issue', {
    extra: { projectId: 233 },
    context: {
      schema: 'iglu:com.gitlab/design_management_context/jsonschema/1-0-0',
      data: {
        'design-version-number': '1.0.0',
        'design-is-current-version': '1.0.1',
      },
    },
  });
  1. Debug dispatch_snowplow_event.js to verify it does not send extra and context props.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #431188 (closed)

Merge request reports