summaryrefslogtreecommitdiff
path: root/rubocop/rubocop-usage-data.yml
blob: 129dbc75acf03a12017291e9ead632f4f8ebe31a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
UsageData/LargeTable:
  Enabled: true
  Include:
    - 'lib/gitlab/usage_data.rb'
    - 'ee/lib/ee/gitlab/usage_data.rb'
  NonRelatedClasses:
    - :ActionMailer::Base
    - :Date
    - :Feature
    - :Gitlab
    - :Gitlab::AppLogger
    - :Gitlab::Auth
    - :Gitlab::CurrentSettings
    - :Gitlab::Database
    - :Gitlab::ErrorTracking
    - :Gitlab::Geo
    - :Gitlab::Git
    - :Gitlab::IncomingEmail
    - :Gitlab::Metrics
    - :Gitlab::Runtime
    - :Gitaly::Server
    - :Gitlab::UsageData
    - :Gitlab::UsageDataCounters
    - :Arel::Nodes::NamedFunction
    - :Arel
    - :License
    - :Rails
    - :Time
    - :SECURE_PRODUCT_TYPES
    - :Settings
    - :CE_MEMOIZED_VALUES
    - :EE_MEMOIZED_VALUES
    - :Ohai::System
  CountMethods:
    - :count
    - :distinct_count
    - :histogram
  AllowedMethods:
    - :arel_table
    - :minimum
    - :maximum
UsageData/HistogramWithLargeTable:
  Enabled: true
  Include:
    - 'lib/gitlab/usage_data.rb'
    - 'ee/lib/ee/gitlab/usage_data.rb'
  HighTrafficModels: &high_traffic_models # models for all high traffic tables in Migration/UpdateLargeTable
    - 'AuditEvent'
    - 'CommitStatus'
    - 'Ci::Processable'
    - 'Ci::Bridge'
    - 'Ci::Build'
    - 'GenericCommitStatus'
    - 'Ci::BuildMetadata'
    - 'Ci::JobArtifact'
    - 'Ci::PipelineVariable'
    - 'Ci::Pipeline'
    - 'Ci::Stage'
    - 'Deployment'
    - 'Event'
    - 'PushEvent'
    - 'Issue'
    - 'MergeRequestDiffCommit'
    - 'MergeRequestDiffFile'
    - 'MergeRequestDiff'
    - 'MergeRequest::Metrics'
    - 'MergeRequest'
    - 'NamespaceSetting'
    - 'Namespace'
    - 'Group'
    - 'NoteDiffFile'
    - 'Note'
    - 'DiffNote'
    - 'DiscussionNote'
    - 'SyntheticNote'
    - 'LabelNote'
    - 'MilestoneNote'
    - 'StateNote'
    - 'LegacyDiffNote'
    - 'ProjectAuthorization'
    - 'Project'
    - 'ProjectCiCdSetting'
    - 'ProjectSetting'
    - 'ProjectFeature'
    - 'ProtectedBranch'
    - 'ExportedProtectedBranch'
    - 'PushEventPayload'
    - 'ResourceLabelEvent'
    - 'Route'
    - 'SentNotification'
    - 'SystemNoteMetadata'
    - 'ActsAsTaggableOn::Tagging'
    - 'Todo'
    - 'User'
    - 'UserPreference'
    - 'UserDetail'
    - 'Vulnerabilities::Finding'
    - 'WebHookLog'
UsageData/DistinctCountByLargeForeignKey:
  Enabled: true
  Include:
    - 'lib/gitlab/usage_data.rb'
    - 'ee/lib/ee/gitlab/usage_data.rb'
  AllowedForeignKeys:
    - 'agent_id'
    - 'author_id'
    - 'clusters.user_id'
    - 'creator_id'
    - 'issue_id'
    - 'merge_request_id'
    - 'merge_requests.target_project_id'
    - 'owner_id'
    - 'project_id'
    - 'user_id'
    - 'resource_owner_id'
    - 'requirement_id'
UsageData/InstrumentationSuperclass:
  Enabled: true
  Include:
    - 'lib/gitlab/usage/metrics/instrumentations/**/*.rb'
  AllowedClasses:
    - :DatabaseMetric
    - :GenericMetric
    - :RedisHLLMetric
    - :RedisMetric
    - :NumbersMetric
    - :AggregatedMetric