Commit 94f8a666 authored by Dmytro Zaporozhets's avatar Dmytro Zaporozhets

Merge branch 'telemetry-updates-to-analytics-caccomulator' into 'master'

Update usage ping analytics accumulator

See merge request gitlab-org/gitlab!36813
parents 8335e88c a82fbb33
...@@ -9,7 +9,7 @@ class Dashboard::TodosController < Dashboard::ApplicationController ...@@ -9,7 +9,7 @@ class Dashboard::TodosController < Dashboard::ApplicationController
before_action :authorize_read_group!, only: :index before_action :authorize_read_group!, only: :index
before_action :find_todos, only: [:index, :destroy_all] before_action :find_todos, only: [:index, :destroy_all]
track_unique_visits :index, target_id: 'u_analytics_todos' track_unique_visits :index, target_id: 'u_todos'
def index def index
@sort = params[:sort] @sort = params[:sort]
......
---
title: Exclude todos from general analytics accumulator ping
merge_request: 36813
author:
type: changed
...@@ -618,6 +618,7 @@ appear to be associated to any of the services running, since they all appear to ...@@ -618,6 +618,7 @@ appear to be associated to any of the services running, since they all appear to
| `sd` | `avg_cycle_analytics - production` | | | | | | `sd` | `avg_cycle_analytics - production` | | | | |
| `missing` | `avg_cycle_analytics - production` | | | | | | `missing` | `avg_cycle_analytics - production` | | | | |
| `total` | `avg_cycle_analytics` | | | | | | `total` | `avg_cycle_analytics` | | | | |
| `u_todos` | | `manage` | | | Visits to /dashboard/todos |
| `g_analytics_contribution` | `analytics_unique_visits` | `manage` | | | Visits to /groups/:group/-/contribution_analytics | | `g_analytics_contribution` | `analytics_unique_visits` | `manage` | | | Visits to /groups/:group/-/contribution_analytics |
| `g_analytics_insights` | `analytics_unique_visits` | `manage` | | | Visits to /groups/:group/-/insights | | `g_analytics_insights` | `analytics_unique_visits` | `manage` | | | Visits to /groups/:group/-/insights |
| `g_analytics_issues` | `analytics_unique_visits` | `manage` | | | Visits to /groups/:group/-/issues_analytics | | `g_analytics_issues` | `analytics_unique_visits` | `manage` | | | Visits to /groups/:group/-/issues_analytics |
...@@ -629,7 +630,6 @@ appear to be associated to any of the services running, since they all appear to ...@@ -629,7 +630,6 @@ appear to be associated to any of the services running, since they all appear to
| `p_analytics_insights` | `analytics_unique_visits` | `manage` | | | Visits to /:group/:project/insights | | `p_analytics_insights` | `analytics_unique_visits` | `manage` | | | Visits to /:group/:project/insights |
| `p_analytics_issues` | `analytics_unique_visits` | `manage` | | | Visits to /:group/:project/-/analytics/issues_analytics | | `p_analytics_issues` | `analytics_unique_visits` | `manage` | | | Visits to /:group/:project/-/analytics/issues_analytics |
| `p_analytics_repo` | `analytics_unique_visits` | `manage` | | | Visits to /:group/:project/-/graphs/master/charts | | `p_analytics_repo` | `analytics_unique_visits` | `manage` | | | Visits to /:group/:project/-/graphs/master/charts |
| `u_analytics_todos` | `analytics_unique_visits` | `manage` | | | Visits to /dashboard/todos |
| `i_analytics_cohorts` | `analytics_unique_visits` | `manage` | | | Visits to /-/instance_statistics/cohorts | | `i_analytics_cohorts` | `analytics_unique_visits` | `manage` | | | Visits to /-/instance_statistics/cohorts |
| `i_analytics_dev_ops_score` | `analytics_unique_visits` | `manage` | | | Visits to /-/instance_statistics/dev_ops_score | | `i_analytics_dev_ops_score` | `analytics_unique_visits` | `manage` | | | Visits to /-/instance_statistics/dev_ops_score |
| `analytics_unique_visits_for_any_target` | `analytics_unique_visits` | `manage` | | | Visits to any of the pages listed above | | `analytics_unique_visits_for_any_target` | `analytics_unique_visits` | `manage` | | | Visits to any of the pages listed above |
......
...@@ -15,7 +15,7 @@ module Gitlab ...@@ -15,7 +15,7 @@ module Gitlab
'p_analytics_insights', 'p_analytics_insights',
'p_analytics_issues', 'p_analytics_issues',
'p_analytics_repo', 'p_analytics_repo',
'u_analytics_todos', 'u_todos',
'i_analytics_cohorts', 'i_analytics_cohorts',
'i_analytics_dev_ops_score' 'i_analytics_dev_ops_score'
].freeze ].freeze
...@@ -40,7 +40,7 @@ module Gitlab ...@@ -40,7 +40,7 @@ module Gitlab
end end
def weekly_unique_visits_for_any_target(week_of: 7.days.ago) def weekly_unique_visits_for_any_target(week_of: 7.days.ago)
keys = TARGET_IDS.map { |target_id| key(target_id, week_of) } keys = TARGET_IDS.select { |id| id =~ /_analytics_/ }.map { |target_id| key(target_id, week_of) }
Gitlab::Redis::SharedState.with do |redis| Gitlab::Redis::SharedState.with do |redis|
redis.pfcount(*keys) redis.pfcount(*keys)
......
...@@ -48,7 +48,7 @@ RSpec.describe Dashboard::TodosController do ...@@ -48,7 +48,7 @@ RSpec.describe Dashboard::TodosController do
it_behaves_like 'tracking unique visits', :index do it_behaves_like 'tracking unique visits', :index do
let(:request_params) { { project_id: authorized_project.id } } let(:request_params) { { project_id: authorized_project.id } }
let(:target_id) { 'u_analytics_todos' } let(:target_id) { 'u_todos' }
end end
end end
end end
......
...@@ -994,7 +994,7 @@ RSpec.describe Gitlab::UsageData, :aggregate_failures do ...@@ -994,7 +994,7 @@ RSpec.describe Gitlab::UsageData, :aggregate_failures do
'p_analytics_insights' => 123, 'p_analytics_insights' => 123,
'p_analytics_issues' => 123, 'p_analytics_issues' => 123,
'p_analytics_repo' => 123, 'p_analytics_repo' => 123,
'u_analytics_todos' => 123, 'u_todos' => 123,
'i_analytics_cohorts' => 123, 'i_analytics_cohorts' => 123,
'i_analytics_dev_ops_score' => 123, 'i_analytics_dev_ops_score' => 123,
'analytics_unique_visits_for_any_target' => 543 'analytics_unique_visits_for_any_target' => 543
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment