Skip to content

Event definitions: merge identifiers and additional properties

Problem

We can further simplify metric definitions by merging identifiers and additional properties.

For end users both are just properties (payload) they pass to Internal Events tracking method to track an event.

We know that identifiers can be only user, namespace and project. Slicing the incoming properties to pass the proper params to existing Snowplow or Redis tracking is not appears to be a problem.

The exiting API is artefact from the past since its the was Snowplow accepts the tracking parameters.

Desired Outcome

consider

properties:
  user:
  project:
  label:
    description: not actually used - to be fixed in https://gitlab.com/gitlab-org/gitlab/-/issues/501387

VS the existing:

additional_properties:
  label:
    description: not actually used - to be fixed in https://gitlab.com/gitlab-
identifiers:
  - user
  - project

Potential Solution

The scale of the change is quite significant:

  1. Update all the definitions (!)
  2. Update CLI tools
  3. Update the existing tracking code
  4. Update the documentation

One of the solution could be to implement the new API and migrate step by step over the next year(s).

Documentation Update Needed

  • Yes
  • No

How to verify

Further actions needed

Edited by 🤖 GitLab Bot 🤖