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
ce5fadfe
Commit
ce5fadfe
authored
Jun 07, 2021
by
Rajendra Kadam
Committed by
Markus Koller
Jun 07, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update tracking calls with user, namespace and project
parent
4fad5220
Changes
13
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
44 additions
and
21 deletions
+44
-21
app/services/issues/zoom_link_service.rb
app/services/issues/zoom_link_service.rb
+2
-2
app/services/members/create_service.rb
app/services/members/create_service.rb
+1
-1
ee/app/controllers/concerns/group_invite_members.rb
ee/app/controllers/concerns/group_invite_members.rb
+1
-1
ee/app/controllers/groups/analytics/coverage_reports_controller.rb
...ntrollers/groups/analytics/coverage_reports_controller.rb
+3
-1
ee/app/controllers/groups/analytics/repository_analytics_controller.rb
...llers/groups/analytics/repository_analytics_controller.rb
+3
-1
ee/spec/controllers/groups/analytics/coverage_reports_controller_spec.rb
...lers/groups/analytics/coverage_reports_controller_spec.rb
+3
-1
ee/spec/controllers/groups/analytics/repository_analytics_controller_spec.rb
.../groups/analytics/repository_analytics_controller_spec.rb
+3
-1
ee/spec/support/shared_examples/controllers/concerns/group_invite_members_shared_examples.rb
...trollers/concerns/group_invite_members_shared_examples.rb
+1
-1
lib/api/members.rb
lib/api/members.rb
+1
-1
spec/requests/api/invitations_spec.rb
spec/requests/api/invitations_spec.rb
+4
-2
spec/requests/api/members_spec.rb
spec/requests/api/members_spec.rb
+8
-4
spec/services/issues/zoom_link_service_spec.rb
spec/services/issues/zoom_link_service_spec.rb
+8
-2
spec/services/members/create_service_spec.rb
spec/services/members/create_service_spec.rb
+6
-3
No files found.
app/services/issues/zoom_link_service.rb
View file @
ce5fadfe
...
...
@@ -47,11 +47,11 @@ module Issues
attr_reader
:issue
def
track_meeting_added_event
::
Gitlab
::
Tracking
.
event
(
'IncidentManagement::ZoomIntegration'
,
'add_zoom_meeting'
,
label:
'Issue ID'
,
value:
issue
.
id
)
::
Gitlab
::
Tracking
.
event
(
'IncidentManagement::ZoomIntegration'
,
'add_zoom_meeting'
,
label:
'Issue ID'
,
value:
issue
.
id
,
user:
current_user
,
project:
@project
,
namespace:
@project
.
namespace
)
end
def
track_meeting_removed_event
::
Gitlab
::
Tracking
.
event
(
'IncidentManagement::ZoomIntegration'
,
'remove_zoom_meeting'
,
label:
'Issue ID'
,
value:
issue
.
id
)
::
Gitlab
::
Tracking
.
event
(
'IncidentManagement::ZoomIntegration'
,
'remove_zoom_meeting'
,
label:
'Issue ID'
,
value:
issue
.
id
,
user:
current_user
,
project:
@project
,
namespace:
@project
.
namespace
)
end
def
add_zoom_meeting
(
link
)
...
...
app/services/members/create_service.rb
View file @
ce5fadfe
...
...
@@ -75,7 +75,7 @@ module Members
def
after_execute
(
member
:)
super
Gitlab
::
Tracking
.
event
(
self
.
class
.
name
,
'create_member'
,
label:
invite_source
,
property:
tracking_property
(
member
))
Gitlab
::
Tracking
.
event
(
self
.
class
.
name
,
'create_member'
,
label:
invite_source
,
property:
tracking_property
(
member
)
,
user:
current_user
)
end
def
invite_source
...
...
ee/app/controllers/concerns/group_invite_members.rb
View file @
ce5fadfe
...
...
@@ -12,7 +12,7 @@ module GroupInviteMembers
result
=
Members
::
CreateService
.
new
(
current_user
,
invite_params
).
execute
::
Gitlab
::
Tracking
.
event
(
self
.
class
.
name
,
'invite_members'
,
label:
'new_group_form'
)
if
result
[
:status
]
==
:success
::
Gitlab
::
Tracking
.
event
(
self
.
class
.
name
,
'invite_members'
,
label:
'new_group_form'
,
user:
current_user
)
if
result
[
:status
]
==
:success
end
def
emails_param
...
...
ee/app/controllers/groups/analytics/coverage_reports_controller.rb
View file @
ce5fadfe
...
...
@@ -52,7 +52,9 @@ class Groups::Analytics::CoverageReportsController < Groups::Analytics::Applicat
def
download_tracker_params
{
label:
'group_id'
,
value:
@group
.
id
value:
@group
.
id
,
user:
current_user
,
namespace:
@group
}
end
end
ee/app/controllers/groups/analytics/repository_analytics_controller.rb
View file @
ce5fadfe
...
...
@@ -19,7 +19,9 @@ class Groups::Analytics::RepositoryAnalyticsController < Groups::Analytics::Appl
def
pageview_tracker_params
{
label:
'group_id'
,
value:
@group
.
id
value:
@group
.
id
,
user:
current_user
,
namespace:
@group
}
end
end
ee/spec/controllers/groups/analytics/coverage_reports_controller_spec.rb
View file @
ce5fadfe
...
...
@@ -66,7 +66,9 @@ RSpec.describe Groups::Analytics::CoverageReportsController do
category:
described_class
.
name
,
action:
'download_code_coverage_csv'
,
label:
'group_id'
,
value:
group
.
id
value:
group
.
id
,
user:
user
,
namespace:
group
)
expect
(
response
).
to
have_gitlab_http_status
(
:ok
)
...
...
ee/spec/controllers/groups/analytics/repository_analytics_controller_spec.rb
View file @
ce5fadfe
...
...
@@ -29,7 +29,9 @@ RSpec.describe Groups::Analytics::RepositoryAnalyticsController do
category:
'Groups::Analytics::RepositoryAnalyticsController'
,
action:
'show'
,
label:
'group_id'
,
value:
group
.
id
value:
group
.
id
,
namespace:
group
,
user:
current_user
)
end
...
...
ee/spec/support/shared_examples/controllers/concerns/group_invite_members_shared_examples.rb
View file @
ce5fadfe
...
...
@@ -32,7 +32,7 @@ RSpec.shared_examples GroupInviteMembers do
it
'tracks the event'
do
subject
expect_snowplow_event
(
category:
anything
,
action:
'invite_members'
,
label:
'new_group_form'
)
expect_snowplow_event
(
category:
anything
,
action:
'invite_members'
,
label:
'new_group_form'
,
user:
user
)
end
end
end
...
...
lib/api/members.rb
View file @
ce5fadfe
...
...
@@ -117,7 +117,7 @@ module API
not_allowed!
# This currently can only be reached in EE
elsif
member
.
valid?
&&
member
.
persisted?
present_members
(
member
)
Gitlab
::
Tracking
.
event
(
::
Members
::
CreateService
.
name
,
'create_member'
,
label:
params
[
:invite_source
],
property:
'existing_user'
)
Gitlab
::
Tracking
.
event
(
::
Members
::
CreateService
.
name
,
'create_member'
,
label:
params
[
:invite_source
],
property:
'existing_user'
,
user:
current_user
)
else
render_validation_error!
(
member
)
end
...
...
spec/requests/api/invitations_spec.rb
View file @
ce5fadfe
...
...
@@ -162,7 +162,8 @@ RSpec.describe API::Invitations do
category:
'Members::InviteService'
,
action:
'create_member'
,
label:
'api'
,
property:
'net_new_user'
property:
'net_new_user'
,
user:
maintainer
)
end
...
...
@@ -173,7 +174,8 @@ RSpec.describe API::Invitations do
category:
'Members::InviteService'
,
action:
'create_member'
,
label:
'_invite_source_'
,
property:
'net_new_user'
property:
'net_new_user'
,
user:
maintainer
)
end
end
...
...
spec/requests/api/members_spec.rb
View file @
ce5fadfe
...
...
@@ -266,7 +266,8 @@ RSpec.describe API::Members do
category:
'Members::CreateService'
,
action:
'create_member'
,
label:
'api'
,
property:
'existing_user'
property:
'existing_user'
,
user:
maintainer
)
end
...
...
@@ -278,7 +279,8 @@ RSpec.describe API::Members do
category:
'Members::CreateService'
,
action:
'create_member'
,
label:
'_invite_source_'
,
property:
'existing_user'
property:
'existing_user'
,
user:
maintainer
)
end
end
...
...
@@ -321,7 +323,8 @@ RSpec.describe API::Members do
category:
'Members::CreateService'
,
action:
'create_member'
,
label:
'api'
,
property:
'existing_user'
property:
'existing_user'
,
user:
maintainer
)
end
...
...
@@ -333,7 +336,8 @@ RSpec.describe API::Members do
category:
'Members::CreateService'
,
action:
'create_member'
,
label:
'_invite_source_'
,
property:
'existing_user'
property:
'existing_user'
,
user:
maintainer
)
end
end
...
...
spec/services/issues/zoom_link_service_spec.rb
View file @
ce5fadfe
...
...
@@ -53,7 +53,10 @@ RSpec.describe Issues::ZoomLinkService do
category:
'IncidentManagement::ZoomIntegration'
,
action:
'add_zoom_meeting'
,
label:
'Issue ID'
,
value:
issue
.
id
value:
issue
.
id
,
user:
user
,
project:
project
,
namespace:
project
.
namespace
)
end
...
...
@@ -192,7 +195,10 @@ RSpec.describe Issues::ZoomLinkService do
category:
'IncidentManagement::ZoomIntegration'
,
action:
'remove_zoom_meeting'
,
label:
'Issue ID'
,
value:
issue
.
id
value:
issue
.
id
,
user:
user
,
project:
project
,
namespace:
project
.
namespace
)
end
end
...
...
spec/services/members/create_service_spec.rb
View file @
ce5fadfe
...
...
@@ -93,7 +93,8 @@ RSpec.describe Members::CreateService, :aggregate_failures, :clean_gitlab_redis_
category:
described_class
.
name
,
action:
'create_member'
,
label:
'unknown'
,
property:
'existing_user'
property:
'existing_user'
,
user:
user
)
end
end
...
...
@@ -108,7 +109,8 @@ RSpec.describe Members::CreateService, :aggregate_failures, :clean_gitlab_redis_
category:
described_class
.
name
,
action:
'create_member'
,
label:
'_invite_source_'
,
property:
'existing_user'
property:
'existing_user'
,
user:
user
)
end
end
...
...
@@ -123,7 +125,8 @@ RSpec.describe Members::CreateService, :aggregate_failures, :clean_gitlab_redis_
category:
described_class
.
name
,
action:
'create_member'
,
label:
'unknown'
,
property:
'net_new_user'
property:
'net_new_user'
,
user:
user
)
end
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