Display Events in monitor script without running Snowplow Micro
What does this MR do and why?
This MR adds a small mock server to Monitor script. It allows to receive and display the Snowplow events in Monitor without need to run Snowplow Micro locally.
The server uses standard webrick
package and additionally Thread
class. It runs server in a separate thread while Monitor is active and shutting it down on exit.
For an end user the experience is seamless, depending on running Snowplow Micro or not, the script will determine it and act accordingly.
On server restart event will be lost, which work the same way as Snowplow Micro.
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
Before | After |
---|---|
How to set up and validate locally
- Stop local Snowplow Micro instance (of running)
gdk stop snowplow-micro
- Start Monitor script
rails runner scripts/internal_events/monitor.rb i_code_review_user_create_mr
- Verify Monitor work a)
bundle exec rails c
b)Gitlab::InternalEvents.track_event('i_code_review_user_create_mr', additional_properties: { label: "l", value: 1, property: "p", lang: "ruby"})
Related to #465225 (closed)