Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
666fa798
Commit
666fa798
authored
Nov 25, 2021
by
Piotr Skorupa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move SNOWPLOW_NAMESPACE to Snowplow destination class
parent
093f6884
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
5 deletions
+5
-5
lib/gitlab/tracking.rb
lib/gitlab/tracking.rb
+0
-2
lib/gitlab/tracking/destinations/snowplow.rb
lib/gitlab/tracking/destinations/snowplow.rb
+4
-2
spec/lib/gitlab/tracking/destinations/snowplow_spec.rb
spec/lib/gitlab/tracking/destinations/snowplow_spec.rb
+1
-1
No files found.
lib/gitlab/tracking.rb
View file @
666fa798
...
...
@@ -2,8 +2,6 @@
module
Gitlab
module
Tracking
SNOWPLOW_NAMESPACE
=
'gl'
class
<<
self
def
enabled?
snowplow_micro_enabled?
||
Gitlab
::
CurrentSettings
.
snowplow_enabled?
...
...
lib/gitlab/tracking/destinations/snowplow.rb
View file @
666fa798
...
...
@@ -8,6 +8,8 @@ module Gitlab
class
Snowplow
<
Base
extend
::
Gitlab
::
Utils
::
Override
SNOWPLOW_NAMESPACE
=
'gl'
override
:event
def
event
(
category
,
action
,
label:
nil
,
property:
nil
,
value:
nil
,
context:
nil
)
return
unless
enabled?
...
...
@@ -19,7 +21,7 @@ module Gitlab
def
options
(
group
)
additional_features
=
Feature
.
enabled?
(
:additional_snowplow_tracking
,
group
,
type: :ops
)
{
namespace:
Gitlab
::
Tracking
::
SNOWPLOW_NAMESPACE
,
namespace:
SNOWPLOW_NAMESPACE
,
hostname:
hostname
,
cookie_domain:
cookie_domain
,
app_id:
app_id
,
...
...
@@ -54,7 +56,7 @@ module Gitlab
@tracker
||=
SnowplowTracker
::
Tracker
.
new
(
emitter
,
SnowplowTracker
::
Subject
.
new
,
Gitlab
::
Tracking
::
SNOWPLOW_NAMESPACE
,
SNOWPLOW_NAMESPACE
,
app_id
)
end
...
...
spec/lib/gitlab/tracking/destinations/snowplow_spec.rb
View file @
666fa798
...
...
@@ -29,7 +29,7 @@ RSpec.describe Gitlab::Tracking::Destinations::Snowplow do
expect
(
SnowplowTracker
::
Tracker
)
.
to
receive
(
:new
)
.
with
(
emitter
,
an_instance_of
(
SnowplowTracker
::
Subject
),
Gitlab
::
Tracking
::
SNOWPLOW_NAMESPACE
,
'_abc123_'
)
.
with
(
emitter
,
an_instance_of
(
SnowplowTracker
::
Subject
),
described_class
::
SNOWPLOW_NAMESPACE
,
'_abc123_'
)
.
and_return
(
tracker
)
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment