Skip to content

Track highlighter and dependency linker usage

What does this MR do and why?

To help us decide whether what we can do to dependency linking part of Gitlab::Highlight class, we track usage of Gitlab::Highlight and Gitlab::DependencyLinker.

This can help us get the following metrics:

  • total usage of Gitlab::Highlight
  • usage of dependency linker on blobs
  • usage of dependency linker on diffs

How to set up and validate locally

  1. Create a MR (MR A) with files that don't need dependency linking.
  2. Create a MR (MR B) with a file that needs dependency linking (e.g. Gemfile).
  3. View MR A. gitlab_highlight_usage metric should see an increase but dependency_linker_usage metric shouldn't increase.
  4. View MR B. gitlab_highlight_usage metric should see an increase and dependency_linker_usage metric increases as well.

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 #435427 (closed)

Edited by Hordur Freyr Yngvason

Merge request reports

Loading