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
ea1dcff6
Commit
ea1dcff6
authored
Nov 18, 2020
by
syasonik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add aggregration metrics for alert actions and incident actions
parent
945cc9c5
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
65 additions
and
2 deletions
+65
-2
app/graphql/mutations/alert_management/create_alert_issue.rb
app/graphql/mutations/alert_management/create_alert_issue.rb
+1
-0
changelogs/unreleased/sy-add-alert-mau-aggrgation.yml
changelogs/unreleased/sy-add-alert-mau-aggrgation.yml
+5
-0
config/feature_flags/development/usage_data_incident_management_alert_create_incident.yml
.../usage_data_incident_management_alert_create_incident.yml
+8
-0
config/feature_flags/development/usage_data_incident_management_alerts_total_unique_counts.yml
...e_data_incident_management_alerts_total_unique_counts.yml
+8
-0
config/feature_flags/development/usage_data_incident_management_incidents_total_unique_counts.yml
...ata_incident_management_incidents_total_unique_counts.yml
+8
-0
lib/gitlab/usage_data_counters/aggregated_metrics/common.yml
lib/gitlab/usage_data_counters/aggregated_metrics/common.yml
+25
-0
lib/gitlab/usage_data_counters/known_events/common.yml
lib/gitlab/usage_data_counters/known_events/common.yml
+6
-0
spec/graphql/mutations/alert_management/create_alert_issue_spec.rb
...hql/mutations/alert_management/create_alert_issue_spec.rb
+1
-0
spec/lib/gitlab/usage_data_counters/aggregated_metrics_spec.rb
...lib/gitlab/usage_data_counters/aggregated_metrics_spec.rb
+1
-1
spec/lib/gitlab/usage_data_counters/hll_redis_counter_spec.rb
.../lib/gitlab/usage_data_counters/hll_redis_counter_spec.rb
+1
-0
spec/lib/gitlab/usage_data_spec.rb
spec/lib/gitlab/usage_data_spec.rb
+1
-1
No files found.
app/graphql/mutations/alert_management/create_alert_issue.rb
View file @
ea1dcff6
...
...
@@ -10,6 +10,7 @@ module Mutations
result
=
create_alert_issue
(
alert
,
current_user
)
track_usage_event
(
:incident_management_incident_created
,
current_user
.
id
)
track_usage_event
(
:incident_management_alert_create_incident
,
current_user
.
id
)
prepare_response
(
alert
,
result
)
end
...
...
changelogs/unreleased/sy-add-alert-mau-aggrgation.yml
0 → 100644
View file @
ea1dcff6
---
title
:
Add metrics for count of unique users of alerts and incidents to usage ping
merge_request
:
48087
author
:
type
:
changed
config/feature_flags/development/usage_data_incident_management_alert_create_incident.yml
0 → 100644
View file @
ea1dcff6
---
name
:
usage_data_incident_management_alert_create_incident
introduced_by_url
:
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/48087
rollout_issue_url
:
milestone
:
'
13.7'
type
:
development
group
:
group::monitor
default_enabled
:
true
config/feature_flags/development/usage_data_incident_management_alerts_total_unique_counts.yml
0 → 100644
View file @
ea1dcff6
---
name
:
usage_data_incident_management_alerts_total_unique_counts
introduced_by_url
:
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/48087
rollout_issue_url
:
milestone
:
'
13.7'
type
:
development
group
:
group::monitor
default_enabled
:
false
config/feature_flags/development/usage_data_incident_management_incidents_total_unique_counts.yml
0 → 100644
View file @
ea1dcff6
---
name
:
usage_data_incident_management_incidents_total_unique_counts
introduced_by_url
:
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/48087
rollout_issue_url
:
milestone
:
'
13.7'
type
:
development
group
:
group::monitor
default_enabled
:
false
lib/gitlab/usage_data_counters/aggregated_metrics/common.yml
View file @
ea1dcff6
...
...
@@ -15,3 +15,28 @@
-
name
:
product_analytics_test_metrics_intersection
operator
:
AND
events
:
[
'
i_search_total'
,
'
i_search_advanced'
,
'
i_search_paid'
]
-
name
:
incident_management_alerts_total_unique_counts
operator
:
OR
events
:
[
'
incident_management_alert_status_changed'
,
'
incident_management_alert_assigned'
,
'
incident_management_alert_todo'
,
'
incident_management_alert_create_incident'
]
feature_flag
:
usage_data_incident_management_alerts_total_unique_counts
-
name
:
incident_management_incidents_total_unique_counts
operator
:
OR
events
:
[
'
incident_management_incident_created'
,
'
incident_management_incident_reopened'
,
'
incident_management_incident_closed'
,
'
incident_management_incident_assigned'
,
'
incident_management_incident_todo'
,
'
incident_management_incident_comment'
,
'
incident_management_incident_zoom_meeting'
,
'
incident_management_incident_published'
,
'
incident_management_incident_relate'
,
'
incident_management_incident_unrelate'
,
'
incident_management_incident_change_confidential'
]
feature_flag
:
usage_data_incident_management_incidents_total_unique_counts
lib/gitlab/usage_data_counters/known_events/common.yml
View file @
ea1dcff6
...
...
@@ -229,6 +229,12 @@
category
:
incident_management
aggregation
:
weekly
feature_flag
:
usage_data_incident_management_incident_change_confidential
# Incident management alerts
-
name
:
incident_management_alert_create_incident
redis_slot
:
incident_management
category
:
incident_management_alerts
aggregation
:
weekly
feature_flag
:
usage_data_incident_management_alert_create_incident
# Testing category
-
name
:
i_testing_test_case_parsed
category
:
testing
...
...
spec/graphql/mutations/alert_management/create_alert_issue_spec.rb
View file @
ea1dcff6
...
...
@@ -28,6 +28,7 @@ RSpec.describe Mutations::AlertManagement::CreateAlertIssue do
end
it_behaves_like
'an incident management tracked event'
,
:incident_management_incident_created
it_behaves_like
'an incident management tracked event'
,
:incident_management_alert_create_incident
end
context
'when CreateAlertIssue responds with an error'
do
...
...
spec/lib/gitlab/usage_data_counters/aggregated_metrics_spec.rb
View file @
ea1dcff6
...
...
@@ -8,7 +8,7 @@ RSpec.describe 'aggregated metrics' do
Gitlab
::
UsageDataCounters
::
HLLRedisCounter
.
known_event?
(
event
)
end
failure_message
do
failure_message
do
|
event
|
"Event with name: `
#{
event
}
` can not be found within `
#{
Gitlab
::
UsageDataCounters
::
HLLRedisCounter
::
KNOWN_EVENTS_PATH
}
`"
end
end
...
...
spec/lib/gitlab/usage_data_counters/hll_redis_counter_spec.rb
View file @
ea1dcff6
...
...
@@ -30,6 +30,7 @@ RSpec.describe Gitlab::UsageDataCounters::HLLRedisCounter, :clean_gitlab_redis_s
'search'
,
'source_code'
,
'incident_management'
,
'incident_management_alerts'
,
'testing'
,
'issues_edit'
,
'ci_secrets_management'
,
...
...
spec/lib/gitlab/usage_data_spec.rb
View file @
ea1dcff6
...
...
@@ -1235,7 +1235,7 @@ RSpec.describe Gitlab::UsageData, :aggregate_failures do
subject
{
described_class
.
redis_hll_counters
}
let
(
:categories
)
{
::
Gitlab
::
UsageDataCounters
::
HLLRedisCounter
.
categories
}
let
(
:ineligible_total_categories
)
{
%w[source_code testing ci_secrets_management]
}
let
(
:ineligible_total_categories
)
{
%w[source_code testing ci_secrets_management
incident_management_alerts
]
}
it
'has all known_events'
do
expect
(
subject
).
to
have_key
(
:redis_hll_counters
)
...
...
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