Class: Gitlab::Tracking::Destinations::DatabaseEventsSnowplow

Inherits:
Snowplow
  • Object
show all
Extended by:
Utils::Override
Defined in:
lib/gitlab/tracking/destinations/database_events_snowplow.rb

Constant Summary collapse

HOSTNAME =
'db-snowplow.trx.gitlab.net'

Constants inherited from Snowplow

Snowplow::SNOWPLOW_NAMESPACE

Instance Method Summary collapse

Methods included from Utils::Override

extended, extensions, included, method_added, override, prepended, queue_verification, verify!

Methods inherited from Snowplow

#event, #options

Methods inherited from Base

#event

Instance Method Details

#enabled?Boolean

database events are only collected for SaaS instance

Returns:

  • (Boolean)


13
14
15
# File 'lib/gitlab/tracking/destinations/database_events_snowplow.rb', line 13

def enabled?
  ::Gitlab.dev_or_test_env? || ::Gitlab.com?
end

#hostnameObject



18
19
20
21
22
# File 'lib/gitlab/tracking/destinations/database_events_snowplow.rb', line 18

def hostname
  return Gitlab::CurrentSettings.snowplow_database_collector_hostname || HOSTNAME if ::Gitlab.com?

  'localhost:9091'
end