Allow monitor script to be run in a "service-ping only" mode without requiring snowplow-micro
Motivation
When testing internal events, the monitor script is very helpful for tracking the effects of interactions on metrics and reported snowplow events. However, if engineers have not set up snowplow-micro before, it can be a bit of a hassle to configure it before using the monitor. If snowplow-specific details aren't critical for engineers to test, it might also not be meaningful effort.
Proposal
Option 1: Simple Setting
Add an environment variable or argument/flag to use with scripts/internal_events/monitor.rb
, which would optionally skip generating the snowplow table.
example)
SKIP_SNOWPLOW_MONITORING=1 bin/rails runner scripts/internal_events/monitor.rb g_edit_by_web_ide g_edit_by_sfe
bin/rails runner scripts/internal_events/monitor.rb g_edit_by_web_ide g_edit_by_sfe --skip-snowplow
Option 2: Availability Based Prompt
Prompt the user on how they want to proceed when snowplow isn't connected.
current
% bin/rails runner scripts/internal_events/monitor.rb g_edit_by_web_ide
Could not connect to Snowplow Micro.
Please follow these instruction to set up Snowplow Micro:
https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/main/doc/howto/snowplow_micro.md
proposed
% bin/rails runner scripts/internal_events/monitor.rb g_edit_by_web_ide
Warning: Could not connect to Snowplow Micro!
If you continue, the monitor will not include events sent to snowplow and will show only changes to service ping metrics based on internal events.
Please follow these instruction to set up Snowplow Micro:
https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/main/doc/howto/snowplow_micro.md
Would you like to continue to the monitor without Snowplow Micro? Y/n
Edited by Sarah Yasonik