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
751f95ea
Commit
751f95ea
authored
May 17, 2021
by
Luis Mejia
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Deprecate Usage Ping metrics
parent
0cf021ab
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
20 additions
and
15 deletions
+20
-15
changelogs/unreleased/321786-update-usage-ping-metrics-definitions-for-group-apm.yml
...6-update-usage-ping-metrics-definitions-for-group-apm.yml
+5
-0
config/metrics/counts_all/20210216175019_projects_with_prometheus_alerts.yml
...ts_all/20210216175019_projects_with_prometheus_alerts.yml
+2
-2
config/metrics/counts_all/20210216175021_pod_logs_usages_total.yml
...trics/counts_all/20210216175021_pod_logs_usages_total.yml
+2
-2
doc/development/usage_ping/dictionary.md
doc/development/usage_ping/dictionary.md
+4
-4
ee/lib/ee/gitlab/usage_data.rb
ee/lib/ee/gitlab/usage_data.rb
+2
-2
ee/spec/lib/ee/gitlab/usage_data_spec.rb
ee/spec/lib/ee/gitlab/usage_data_spec.rb
+3
-3
lib/gitlab/usage_data.rb
lib/gitlab/usage_data.rb
+1
-1
spec/lib/gitlab/usage_data_spec.rb
spec/lib/gitlab/usage_data_spec.rb
+1
-1
No files found.
changelogs/unreleased/321786-update-usage-ping-metrics-definitions-for-group-apm.yml
0 → 100644
View file @
751f95ea
---
title
:
Deprecate projects_with_prometheus_alerts and pod_logs_usages_total metrics
merge_request
:
61872
author
:
type
:
deprecated
config/metrics/counts_all/20210216175019_projects_with_prometheus_alerts.yml
View file @
751f95ea
...
...
@@ -3,10 +3,10 @@ key_path: counts.projects_with_prometheus_alerts
description
:
Projects with Prometheus alerting enabled
product_section
:
ops
product_stage
:
monitor
product_group
:
group::
apm
product_group
:
group::
monitor
product_category
:
metrics
value_type
:
number
status
:
d
ata_available
status
:
d
eprecated
time_frame
:
all
data_source
:
database
distribution
:
...
...
config/metrics/counts_all/20210216175021_pod_logs_usages_total.yml
View file @
751f95ea
...
...
@@ -3,10 +3,10 @@ key_path: counts.pod_logs_usages_total
description
:
Count the total number of log views
product_section
:
ops
product_stage
:
monitor
product_group
:
group::
apm
product_group
:
group::
monitor
product_category
:
logging
value_type
:
number
status
:
d
ata_available
status
:
d
eprecated
time_frame
:
all
data_source
:
database
distribution
:
...
...
doc/development/usage_ping/dictionary.md
View file @
751f95ea
...
...
@@ -3832,9 +3832,9 @@ Count the total number of log views
[
YAML definition
](
https://gitlab.com/gitlab-org/gitlab/-/blob/master/config/metrics/counts_all/20210216175021_pod_logs_usages_total.yml
)
Group:
`group::
apm
`
Group:
`group::
monitor
`
Status:
`d
ata_available
`
Status:
`d
eprecated
`
Tiers:
`free`
...
...
@@ -5212,9 +5212,9 @@ Projects with Prometheus alerting enabled
[
YAML definition
](
https://gitlab.com/gitlab-org/gitlab/-/blob/master/config/metrics/counts_all/20210216175019_projects_with_prometheus_alerts.yml
)
Group:
`group::
apm
`
Group:
`group::
monitor
`
Status:
`d
ata_available
`
Status:
`d
eprecated
`
Tiers:
`free`
...
...
ee/lib/ee/gitlab/usage_data.rb
View file @
751f95ea
...
...
@@ -201,7 +201,7 @@ module EE
issues_with_health_status:
count
(
::
Issue
.
with_health_status
,
start:
minimum_id
(
::
Issue
),
finish:
maximum_id
(
::
Issue
)),
ldap_keys:
count
(
::
LDAPKey
),
ldap_users:
count
(
::
User
.
ldap
,
'users.id'
),
pod_logs_usages_total:
redis_usage_data
{
::
Gitlab
::
UsageCounters
::
PodLogs
.
usage_totals
[
:total
]
}
,
pod_logs_usages_total:
DEPRECATED_VALUE
,
merged_merge_requests_using_approval_rules:
count
(
::
MergeRequest
.
merged
.
joins
(
:approval_rules
),
# rubocop: disable CodeReuse/ActiveRecord
start:
minimum_id
(
::
MergeRequest
),
finish:
maximum_id
(
::
MergeRequest
)),
...
...
@@ -234,7 +234,7 @@ module EE
super
.
merge
({
projects_slack_notifications_active:
distinct_count
(
::
Project
.
with_slack_service
.
where
(
time_period
),
:creator_id
),
projects_slack_slash_active:
distinct_count
(
::
Project
.
with_slack_slash_commands_service
.
where
(
time_period
),
:creator_id
),
projects_with_prometheus_alerts:
distinct_count
(
::
Project
.
with_prometheus_service
.
where
(
time_period
),
:creator_id
)
projects_with_prometheus_alerts:
DEPRECATED_VALUE
})
end
...
...
ee/spec/lib/ee/gitlab/usage_data_spec.rb
View file @
751f95ea
...
...
@@ -125,7 +125,7 @@ RSpec.describe Gitlab::UsageData do
network_policy_drops
)
)
expect
(
count_data
[
:projects_with_prometheus_alerts
]).
to
eq
(
2
)
expect
(
count_data
[
:projects_with_prometheus_alerts
]).
to
eq
(
DEPRECATED_VALUE
)
expect
(
count_data
[
:feature_flags
]).
to
eq
(
1
)
expect
(
count_data
[
:status_page_projects
]).
to
eq
(
1
)
expect
(
count_data
[
:status_page_issues
]).
to
eq
(
1
)
...
...
@@ -268,12 +268,12 @@ RSpec.describe Gitlab::UsageData do
expect
(
described_class
.
usage_activity_by_stage_configure
({})).
to
include
(
projects_slack_notifications_active:
2
,
projects_slack_slash_active:
2
,
projects_with_prometheus_alerts:
2
projects_with_prometheus_alerts:
DEPRECATED_VALUE
)
expect
(
described_class
.
usage_activity_by_stage_configure
(
described_class
.
last_28_days_time_period
)).
to
include
(
projects_slack_notifications_active:
1
,
projects_slack_slash_active:
1
,
projects_with_prometheus_alerts:
1
projects_with_prometheus_alerts:
DEPRECATED_VALUE
)
end
end
...
...
lib/gitlab/usage_data.rb
View file @
751f95ea
...
...
@@ -165,7 +165,7 @@ module Gitlab
projects_with_error_tracking_enabled:
count
(
::
ErrorTracking
::
ProjectErrorTrackingSetting
.
where
(
enabled:
true
)),
projects_with_alerts_created:
distinct_count
(
::
AlertManagement
::
Alert
,
:project_id
),
projects_with_enabled_alert_integrations:
distinct_count
(
::
AlertManagement
::
HttpIntegration
.
active
,
:project_id
),
projects_with_prometheus_alerts:
distinct_count
(
PrometheusAlert
,
:project_id
)
,
projects_with_prometheus_alerts:
DEPRECATED_VALUE
,
projects_with_terraform_reports:
distinct_count
(
::
Ci
::
JobArtifact
.
terraform_reports
,
:project_id
),
projects_with_terraform_states:
distinct_count
(
::
Terraform
::
State
,
:project_id
),
protected_branches:
count
(
ProtectedBranch
),
...
...
spec/lib/gitlab/usage_data_spec.rb
View file @
751f95ea
...
...
@@ -575,7 +575,7 @@ RSpec.describe Gitlab::UsageData, :aggregate_failures do
expect
(
count_data
[
:projects_with_error_tracking_enabled
]).
to
eq
(
1
)
expect
(
count_data
[
:projects_with_tracing_enabled
]).
to
eq
(
1
)
expect
(
count_data
[
:projects_with_enabled_alert_integrations
]).
to
eq
(
1
)
expect
(
count_data
[
:projects_with_prometheus_alerts
]).
to
eq
(
2
)
expect
(
count_data
[
:projects_with_prometheus_alerts
]).
to
eq
(
DEPRECATED_VALUE
)
expect
(
count_data
[
:projects_with_terraform_reports
]).
to
eq
(
2
)
expect
(
count_data
[
:projects_with_terraform_states
]).
to
eq
(
2
)
expect
(
count_data
[
:projects_with_alerts_created
]).
to
eq
(
1
)
...
...
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