Copy i_package_push_package_by_deploy_token to Snowplow
What does this MR do and why?
It resolves #382872 (closed) by logging a snowplow event when a package is pushed to a package repository with a deploy token.
The counts.package_events_i_package_push_package_by_deploy_token Service Ping metric is important to understand on a namespace level for Customer Service / Product Analytics, however insights on that level are not available for Service Ping therefore this metric needs to be mirrored with Snowplow event tracking.
Notice that the event only is logged when the i_package_push_package_by_deploy_token
feature flag is enabled.
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
How to set up and validate locally
The validation is a bit cumbersome due to all the prerequisites.
You can push any another supported package type if you prefer, but the steps assumes that you push a Ruby gem.
Prerequisites
- Enable the events mirroring feature flag
Feature.enable(:route_hll_to_snowplow_phase3)
- Make sure you Snowplow Micro setup and running. (Guide)
- Create a project
- Create a deploy token for the project or group and add it to
~/.gem/credentials
guide. - Create a Ruby gem. (You can clone this one if you don't have one handy)
- Enable the Ruby packages feature flag
Feature.enable(:rubygem_packages)
Test steps
- Push the Ruby gem
gem push simple_ruby_gem-0.1.0.gem --host http://gdk.test:3000/api/v4/projects/<project_id>/packages/rubygems
- Check that the
push_package
event appears in Snowplow Micro.
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 #382872 (closed)