Fix namespace when building SnowplowEventLogger logger
What does this MR do and why?
I keep getting errors when running puma in single thread mode in gdk. I can reproduce this error every time and the change proposed fixes it.
run in single thread mode
gdk stop rails-web && GITLAB_RAILS_RACK_TIMEOUT_ENABLE_LOGGING=false PUMA_SINGLE_MODE=true gdk rails s
kill the process (or attempt to) but it gets stuck
↳ app/models/concerns/cacheable_attributes.rb:19:in `current_without_cache'
#<Thread:0x0000000386075290 /Users/terrichu/.local/share/mise/installs/ruby/3.3.9/lib/ruby/gems/3.3.0/gems/snowplow-tracker-0.8.0/lib/snowplow-tracker/emitters.rb:417 run> terminated with exception (report_on_exception is true):
dk /Users/terrichu/Developer/gdk/gitlab/lib/gitlab/tracking/snowplow_logging_emitter.rb:20:in `event_logger': uninitialized constant Gitlab::Tracking::SnowplowLoggingEmitter::SnowplowEventLogger (NameError)
@event_logger ||= SnowplowEventLogger.build
^^^^^^^^^^^^^^^^^^^
from /Users/terrichu/Developer/gdk/gitlab/lib/gitlab/tracking/snowplow_logging_emitter.rb:11:in `block in send_requests'
from /Users/terrichu/Developer/gdk/gitlab/lib/gitlab/tracking/snowplow_logging_emitter.rb:10:in `each'
from /Users/terrichu/Developer/gdk/gitlab/lib/gitlab/tracking/snowplow_logging_emitter.rb:10:in `send_requests'
from /Users/terrichu/.local/share/mise/installs/ruby/3.3.9/lib/ruby/gems/3.3.0/gems/snowplow-tracker-0.8.0/lib/snowplow-tracker/emitters.rb:427:in `block in consume'
from <internal:kernel>:187:in `loop'
from /Users/terrichu/.local/share/mise/installs/ruby/3.3.9/lib/ruby/gems/3.3.0/gems/snowplow-tracker-0.8.0/lib/snowplow-tracker/emitters.rb:425:in `consume'
from /Users/terrichu/.local/share/mise/installs/ruby/3.3.9/lib/ruby/gems/3.3.0/gems/snowplow-tracker-0.8.0/lib/snowplow-tracker/emitters.rb:417:in `block (2 levels) in initialize'
AI summary
This change updates a reference to a logging class to use its full, explicit path instead of a shortened version. Previously, the code was calling SnowplowEventLogger.build but now it calls ::Gitlab::Tracking::SnowplowEventLogger.build. This makes the code more precise about exactly which logging component it wants to use, reducing the chance of accidentally using the wrong class if there were multiple classes with similar names. It's like changing from saying "call John" to "call John Smith from the accounting department" - being more specific to avoid confusion.
References
Screenshots or screen recordings
| Before | After |
|---|---|
How to set up and validate locally
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.