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
0
Merge Requests
0
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
Jérome Perrin
gitlab-ce
Commits
765ddaeb
Commit
765ddaeb
authored
Nov 02, 2017
by
Pawel Chojnacki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Only enable unicorn metrics when not in sidekiq mode.
+ remove rebased test case
parent
c9f0070b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
5 deletions
+4
-5
config/initializers/7_prometheus_metrics.rb
config/initializers/7_prometheus_metrics.rb
+4
-1
spec/lib/gitlab/metrics/sidekiq_middleware_spec.rb
spec/lib/gitlab/metrics/sidekiq_middleware_spec.rb
+0
-4
No files found.
config/initializers/7_prometheus_metrics.rb
View file @
765ddaeb
...
@@ -29,6 +29,9 @@ Sidekiq.configure_server do |config|
...
@@ -29,6 +29,9 @@ Sidekiq.configure_server do |config|
end
end
if
Gitlab
::
Metrics
.
prometheus_metrics_enabled?
if
Gitlab
::
Metrics
.
prometheus_metrics_enabled?
Gitlab
::
Metrics
::
Samplers
::
UnicornSampler
.
initialize_instance
(
Settings
.
monitoring
.
unicorn_sampler_interval
).
start
unless
Sidekiq
.
server?
Gitlab
::
Metrics
::
Samplers
::
UnicornSampler
.
initialize_instance
(
Settings
.
monitoring
.
unicorn_sampler_interval
).
start
end
Gitlab
::
Metrics
::
Samplers
::
RubySampler
.
initialize_instance
(
Settings
.
monitoring
.
ruby_sampler_interval
).
start
Gitlab
::
Metrics
::
Samplers
::
RubySampler
.
initialize_instance
(
Settings
.
monitoring
.
ruby_sampler_interval
).
start
end
end
spec/lib/gitlab/metrics/sidekiq_middleware_spec.rb
View file @
765ddaeb
...
@@ -21,10 +21,6 @@ describe Gitlab::Metrics::SidekiqMiddleware do
...
@@ -21,10 +21,6 @@ describe Gitlab::Metrics::SidekiqMiddleware do
let
(
:test_worker_class
)
{
double
(
:class
,
name:
'TestWorker'
)
}
let
(
:test_worker_class
)
{
double
(
:class
,
name:
'TestWorker'
)
}
let
(
:worker
)
{
double
(
:worker
,
class:
test_worker_class
)
}
let
(
:worker
)
{
double
(
:worker
,
class:
test_worker_class
)
}
it
'reports correct action based on worker class'
do
end
it
'tracks the transaction'
do
it
'tracks the transaction'
do
run
(
worker
,
message
)
run
(
worker
,
message
)
end
end
...
...
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