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
1ffca35f
Commit
1ffca35f
authored
Aug 26, 2021
by
Aleksei Lipniagov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Disable Instrumentation load under FF
parent
a564138d
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
17 deletions
+31
-17
config/feature_flags/development/method_instrumentation_disable_initialization.yml
...lopment/method_instrumentation_disable_initialization.yml
+8
-0
config/initializers/zz_metrics.rb
config/initializers/zz_metrics.rb
+23
-17
No files found.
config/feature_flags/development/method_instrumentation_disable_initialization.yml
0 → 100644
View file @
1ffca35f
---
name
:
method_instrumentation_disable_initialization
introduced_by_url
:
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/69091
rollout_issue_url
:
https://gitlab.com/gitlab-org/gitlab/-/issues/339665
milestone
:
'
14.3'
type
:
development
group
:
group::memory
default_enabled
:
false
config/initializers/zz_metrics.rb
View file @
1ffca35f
...
@@ -178,6 +178,9 @@ if Gitlab::Metrics.enabled? && !Rails.env.test? && !(Rails.env.development? && d
...
@@ -178,6 +178,9 @@ if Gitlab::Metrics.enabled? && !Rails.env.test? && !(Rails.env.development? && d
ActiveRecord
::
Querying
.
public_instance_methods
(
false
).
map
(
&
:to_s
)
ActiveRecord
::
Querying
.
public_instance_methods
(
false
).
map
(
&
:to_s
)
)
)
# We are removing the Instrumentation module entirely in steps.
# More in https://gitlab.com/gitlab-org/gitlab/-/issues/217978.
unless
::
Feature
.
enabled?
(
:method_instrumentation_disable_initialization
)
Gitlab
::
Metrics
::
Instrumentation
Gitlab
::
Metrics
::
Instrumentation
.
instrument_class_hierarchy
(
ActiveRecord
::
Base
)
do
|
klass
,
method
|
.
instrument_class_hierarchy
(
ActiveRecord
::
Base
)
do
|
klass
,
method
|
# Instrumenting the ApplicationSetting class can lead to an infinite
# Instrumenting the ApplicationSetting class can lead to an infinite
...
@@ -196,10 +199,13 @@ if Gitlab::Metrics.enabled? && !Rails.env.test? && !(Rails.env.development? && d
...
@@ -196,10 +199,13 @@ if Gitlab::Metrics.enabled? && !Rails.env.test? && !(Rails.env.development? && d
# be instrumented.
# be instrumented.
Gitlab
::
Metrics
::
Instrumentation
.
instrument_methods
(
Ability
)
Gitlab
::
Metrics
::
Instrumentation
.
instrument_methods
(
Ability
)
end
end
end
unless
::
Feature
.
enabled?
(
:method_instrumentation_disable_initialization
)
Gitlab
::
Metrics
::
Instrumentation
.
configure
do
|
config
|
Gitlab
::
Metrics
::
Instrumentation
.
configure
do
|
config
|
instrument_classes
(
config
)
instrument_classes
(
config
)
end
end
end
GC
::
Profiler
.
enable
GC
::
Profiler
.
enable
...
...
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