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
798d105c
Commit
798d105c
authored
Dec 22, 2021
by
Jannik Lehmann
Committed by
Ezekiel Kigbo
Dec 22, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add telemetry event for license compliance MR widget body Link
parent
74dadeb0
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
88 additions
and
2 deletions
+88
-2
config/metrics/counts_28d/20211216083832_users_clicking_license_testing_visiting_external_website_monthly.yml
...ing_license_testing_visiting_external_website_monthly.yml
+25
-0
config/metrics/counts_7d/20211216084934_users_clicking_license_testing_visiting_external_website_weekly.yml
...king_license_testing_visiting_external_website_weekly.yml
+25
-0
ee/app/assets/javascripts/vue_shared/license_compliance/components/license_issue_body.vue
...ared/license_compliance/components/license_issue_body.vue
+11
-2
ee/app/assets/javascripts/vue_shared/license_compliance/constants.js
...ts/javascripts/vue_shared/license_compliance/constants.js
+3
-0
ee/spec/frontend/vue_shared/license_compliance/components/license_issue_body_spec.js
.../license_compliance/components/license_issue_body_spec.js
+20
-0
lib/gitlab/usage_data_counters/known_events/common.yml
lib/gitlab/usage_data_counters/known_events/common.yml
+4
-0
No files found.
config/metrics/counts_28d/20211216083832_users_clicking_license_testing_visiting_external_website_monthly.yml
0 → 100644
View file @
798d105c
---
data_category
:
optional
key_path
:
redis_hll_counters.testing.users_clicking_license_testing_visiting_external_website_monthly
description
:
Count of users clicking licence to visit external information website
product_section
:
sec
product_stage
:
secure
product_group
:
group::static analysis
product_category
:
dependency_scanning
value_type
:
number
status
:
active
milestone
:
'
14.7'
introduced_by_url
:
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/76917
time_frame
:
28d
data_source
:
redis_hll
instrumentation_class
:
RedisHLLMetric
options
:
events
:
-
users_clicking_license_testing_visiting_external_website
distribution
:
-
ce
-
ee
tier
:
-
free
-
premium
-
ultimate
\ No newline at end of file
config/metrics/counts_7d/20211216084934_users_clicking_license_testing_visiting_external_website_weekly.yml
0 → 100644
View file @
798d105c
---
data_category
:
optional
key_path
:
redis_hll_counters.testing.users_clicking_license_testing_visiting_external_website_weekly
description
:
Count of users clicking licence to visit external information website
product_section
:
sec
product_stage
:
secure
product_group
:
group::static analysis
product_category
:
dependency_scanning
value_type
:
number
status
:
active
milestone
:
'
14.7'
introduced_by_url
:
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/76917
time_frame
:
7d
data_source
:
redis_hll
instrumentation_class
:
RedisHLLMetric
options
:
events
:
-
users_clicking_license_testing_visiting_external_website
distribution
:
-
ce
-
ee
tier
:
-
free
-
premium
-
ultimate
ee/app/assets/javascripts/vue_shared/license_compliance/components/license_issue_body.vue
View file @
798d105c
<
script
>
import
{
GlLink
}
from
'
@gitlab/ui
'
;
import
{
mapActions
}
from
'
vuex
'
;
import
api
from
'
~/api
'
;
import
{
LICENSE_MANAGEMENT
}
from
'
ee/vue_shared/license_compliance/store/constants
'
;
import
{
LICENSE_LINK_TELEMETRY_EVENT
}
from
'
../constants
'
;
import
LicensePackages
from
'
./license_packages.vue
'
;
export
default
{
...
...
@@ -19,13 +21,20 @@ export default {
return
Boolean
(
this
.
issue
.
packages
.
length
);
},
},
methods
:
{
...
mapActions
(
LICENSE_MANAGEMENT
,
[
'
setLicenseInModal
'
])
},
methods
:
{
...
mapActions
(
LICENSE_MANAGEMENT
,
[
'
setLicenseInModal
'
]),
trackLinkClick
()
{
api
.
trackRedisHllUserEvent
(
LICENSE_LINK_TELEMETRY_EVENT
);
},
},
};
</
script
>
<
template
>
<div
class=
"report-block-info license-item"
>
<gl-link
v-if=
"issue.url"
:href=
"issue.url"
target=
"_blank"
>
{{
issue
.
name
}}
</gl-link>
<gl-link
v-if=
"issue.url"
:href=
"issue.url"
target=
"_blank"
@
click=
"trackLinkClick"
>
{{
issue
.
name
}}
</gl-link>
<span
v-else
data-testid=
"license-copy"
>
{{
issue
.
name
}}
</span>
<license-packages
v-if=
"hasPackages"
:packages=
"issue.packages"
class=
"text-secondary"
/>
</div>
...
...
ee/app/assets/javascripts/vue_shared/license_compliance/constants.js
View file @
798d105c
...
...
@@ -41,3 +41,6 @@ export const REPORT_GROUPS = [
status
:
STATUS_SUCCESS
,
},
];
export
const
LICENSE_LINK_TELEMETRY_EVENT
=
'
users_clicking_license_testing_visiting_external_website
'
;
ee/spec/frontend/vue_shared/license_compliance/components/license_issue_body_spec.js
View file @
798d105c
import
{
GlLink
}
from
'
@gitlab/ui
'
;
import
{
shallowMount
}
from
'
@vue/test-utils
'
;
import
{
LICENSE_LINK_TELEMETRY_EVENT
}
from
'
ee/vue_shared/license_compliance/constants
'
;
import
api
from
'
~/api
'
;
import
LicenseIssueBody
from
'
ee/vue_shared/license_compliance/components/license_issue_body.vue
'
;
import
LicensePackages
from
'
ee/vue_shared/license_compliance/components/license_packages.vue
'
;
import
{
extendedWrapper
}
from
'
helpers/vue_test_utils_helper
'
;
...
...
@@ -79,4 +81,22 @@ describe('LicenseIssueBody', () => {
expect
(
packages
.
exists
()).
toBe
(
false
);
});
});
describe
(
'
event tracking
'
,
()
=>
{
let
trackEventSpy
;
beforeEach
(()
=>
{
trackEventSpy
=
jest
.
spyOn
(
api
,
'
trackRedisHllUserEvent
'
).
mockImplementation
(()
=>
{});
});
afterEach
(()
=>
{
trackEventSpy
.
mockRestore
();
});
it
(
'
tracks users_visiting_testing_license_compliance_full_report
'
,
()
=>
{
findGlLink
().
vm
.
$emit
(
'
click
'
);
expect
(
trackEventSpy
).
toHaveBeenCalledWith
(
LICENSE_LINK_TELEMETRY_EVENT
);
});
});
});
lib/gitlab/usage_data_counters/known_events/common.yml
View file @
798d105c
...
...
@@ -368,6 +368,10 @@
redis_slot
:
testing
category
:
testing
aggregation
:
weekly
-
name
:
users_clicking_license_testing_visiting_external_website
redis_slot
:
testing
category
:
testing
aggregation
:
weekly
# Container Security - Network Policies
-
name
:
clusters_using_network_policies_ui
redis_slot
:
network_policies
...
...
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