Skip to content

Pseudonymization of URLs - Backend

Please see &6551 (closed) for more details

As we want to pseudonymize URLs that we send through our Frontend Snowplow, we need to prepare these URLs. We want to replace dynamic parts with a symbol and only keep the Namespace and Project IDs. An example how the before/after could look like:

URL Route
gitlab.com/my-group/my-awesome-project gitlab.com/group:my-group/project:my-awesome-project
gitlab.com/my-group/my-awesome-project/some_folder/some_file.js gitlab.com/namespace:<namespace_id>/project:<project_id>/:repository_path
gitlab.com/my-group/-/issues gitlab.com/namespace:<namespace_id>/issues
gitlab.com/my-group/my-sub-group/-/issues gitlab.com/namespace:<namespace_id_of_the_sub_group>/-/issues
gitlab.com/checkout gitlab.com/checkout

Considerations

  • As this is done on every page, we need to make sure there are no performance issues. Especially with resolving to the current ID.
  • If there are performance concerns, we could iterate on a solution where we don't submit the IDs but just the route structure
Edited by Nicolas Dular