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
355330dd
Commit
355330dd
authored
Jul 16, 2019
by
Robert Speicher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add EE-only class instrumentation
parent
be7290a9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
0 deletions
+31
-0
config/initializers/zz_metrics.rb
config/initializers/zz_metrics.rb
+31
-0
No files found.
config/initializers/zz_metrics.rb
View file @
355330dd
...
...
@@ -6,6 +6,7 @@
# that we can stub it for testing, as it is only called when metrics are
# enabled.
#
# rubocop:disable Metrics/AbcSize
def
instrument_classes
(
instrumentation
)
instrumentation
.
instrument_instance_methods
(
Gitlab
::
Shell
)
...
...
@@ -86,12 +87,42 @@ def instrument_classes(instrumentation)
instrumentation
.
instrument_methods
(
Gitlab
::
Highlight
)
instrumentation
.
instrument_instance_methods
(
Gitlab
::
Highlight
)
Gitlab
.
ee
do
instrumentation
.
instrument_methods
(
Elasticsearch
::
Git
::
Repository
)
instrumentation
.
instrument_instance_methods
(
Elasticsearch
::
Git
::
Repository
)
instrumentation
.
instrument_instance_methods
(
Search
::
GlobalService
)
instrumentation
.
instrument_instance_methods
(
Search
::
ProjectService
)
instrumentation
.
instrument_instance_methods
(
Gitlab
::
Elastic
::
SearchResults
)
instrumentation
.
instrument_instance_methods
(
Gitlab
::
Elastic
::
ProjectSearchResults
)
instrumentation
.
instrument_instance_methods
(
Gitlab
::
Elastic
::
Indexer
)
instrumentation
.
instrument_instance_methods
(
Gitlab
::
Elastic
::
SnippetSearchResults
)
instrumentation
.
instrument_methods
(
Gitlab
::
Elastic
::
Helper
)
instrumentation
.
instrument_instance_methods
(
Elastic
::
ApplicationSearch
)
instrumentation
.
instrument_instance_methods
(
Elastic
::
IssuesSearch
)
instrumentation
.
instrument_instance_methods
(
Elastic
::
MergeRequestsSearch
)
instrumentation
.
instrument_instance_methods
(
Elastic
::
MilestonesSearch
)
instrumentation
.
instrument_instance_methods
(
Elastic
::
NotesSearch
)
instrumentation
.
instrument_instance_methods
(
Elastic
::
ProjectsSearch
)
instrumentation
.
instrument_instance_methods
(
Elastic
::
RepositoriesSearch
)
instrumentation
.
instrument_instance_methods
(
Elastic
::
SnippetsSearch
)
instrumentation
.
instrument_instance_methods
(
Elastic
::
WikiRepositoriesSearch
)
instrumentation
.
instrument_instance_methods
(
Gitlab
::
BitbucketImport
::
Importer
)
instrumentation
.
instrument_instance_methods
(
Bitbucket
::
Connection
)
instrumentation
.
instrument_instance_methods
(
Geo
::
RepositorySyncWorker
)
end
# This is a Rails scope so we have to instrument it manually.
instrumentation
.
instrument_method
(
Project
,
:visible_to_user
)
# Needed for https://gitlab.com/gitlab-org/gitlab-ce/issues/30224#note_32306159
instrumentation
.
instrument_instance_method
(
MergeRequestDiff
,
:load_commits
)
end
# rubocop:enable Metrics/AbcSize
# With prometheus enabled by default this breaks all specs
# that stubs methods using `any_instance_of` for the models reloaded here.
...
...
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