Track NPM dist-tags routes via snowplow
What does this MR do and why?
This issue has two requirements:
- Add job and deploy token authentication to npm
dist-tag
routes, which is !112804 (merged). - Measure npm
dist-tag
routes via snowplow, so that we can understand how often this route is used on GitLab.com.
This MR addresses the 2nd requirement.
How to set up and validate locally
- Make sure snowplow is run locally.
- Run any
npm dist-tag
commands (add
/ls
/rm
) on a published NPM package. - Open
http://localhost:9091/micro/good
in the browser and you should find the related events:
-
npm dist-tag ls @scope/package
should createlist_tags
event. -
npm dist-tag add @scope/package@version my-tag
should createcreate_tag
events. -
npm dist-tag rm @scope/package@version
my-tag should createdelete_tag
events.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #258835 (closed)
Edited by Moaz Khalifa