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
e24c9e2d
Commit
e24c9e2d
authored
Mar 17, 2022
by
Matthias Käppler
Committed by
Bob Van Landuyt
Mar 17, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix broken metrics_server dependencies
parent
257d5598
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
4 additions
and
7 deletions
+4
-7
bin/metrics-server
bin/metrics-server
+1
-0
config/initializers/7_prometheus_metrics.rb
config/initializers/7_prometheus_metrics.rb
+2
-2
metrics_server/metrics_server.rb
metrics_server/metrics_server.rb
+0
-2
sidekiq_cluster/cli.rb
sidekiq_cluster/cli.rb
+1
-3
No files found.
bin/metrics-server
View file @
e24c9e2d
#!/usr/bin/env ruby
#!/usr/bin/env ruby
# frozen_string_literal: true
# frozen_string_literal: true
require_relative
'../metrics_server/dependencies'
require_relative
'../metrics_server/metrics_server'
require_relative
'../metrics_server/metrics_server'
target
=
ENV
[
'METRICS_SERVER_TARGET'
]
target
=
ENV
[
'METRICS_SERVER_TARGET'
]
...
...
config/initializers/7_prometheus_metrics.rb
View file @
e24c9e2d
# frozen_string_literal: true
# frozen_string_literal: true
PUMA_EXTERNAL_METRICS_SERVER
=
Gitlab
::
Utils
.
to_boolean
(
ENV
[
'PUMA_EXTERNAL_METRICS_SERVER'
])
PUMA_EXTERNAL_METRICS_SERVER
=
Gitlab
::
Utils
.
to_boolean
(
ENV
[
'PUMA_EXTERNAL_METRICS_SERVER'
])
require
Rails
.
root
.
join
(
'metrics_server'
,
'metrics_server'
)
if
PUMA_EXTERNAL_METRICS_SERVER
# Keep separate directories for separate processes
# Keep separate directories for separate processes
def
prometheus_default_multiproc_dir
def
prometheus_default_multiproc_dir
...
@@ -74,8 +75,7 @@ Gitlab::Cluster::LifecycleEvents.on_master_start do
...
@@ -74,8 +75,7 @@ Gitlab::Cluster::LifecycleEvents.on_master_start do
if
Gitlab
::
Runtime
.
puma?
if
Gitlab
::
Runtime
.
puma?
Gitlab
::
Metrics
::
Samplers
::
PumaSampler
.
instance
.
start
Gitlab
::
Metrics
::
Samplers
::
PumaSampler
.
instance
.
start
if
Settings
.
monitoring
.
web_exporter
.
enabled
&&
PUMA_EXTERNAL_METRICS_SERVER
if
PUMA_EXTERNAL_METRICS_SERVER
&&
Settings
.
monitoring
.
web_exporter
.
enabled
require_relative
'../../metrics_server/metrics_server'
MetricsServer
.
start_for_puma
MetricsServer
.
start_for_puma
else
else
Gitlab
::
Metrics
::
Exporter
::
WebExporter
.
instance
.
start
Gitlab
::
Metrics
::
Exporter
::
WebExporter
.
instance
.
start
...
...
metrics_server/metrics_server.rb
View file @
e24c9e2d
...
@@ -2,8 +2,6 @@
...
@@ -2,8 +2,6 @@
require_relative
'../config/boot'
require_relative
'../config/boot'
require_relative
'dependencies'
class
MetricsServer
# rubocop:disable Gitlab/NamespacedClass
class
MetricsServer
# rubocop:disable Gitlab/NamespacedClass
# The singleton instance used to supervise the Puma metrics server.
# The singleton instance used to supervise the Puma metrics server.
PumaProcessSupervisor
=
Class
.
new
(
Gitlab
::
ProcessSupervisor
)
PumaProcessSupervisor
=
Class
.
new
(
Gitlab
::
ProcessSupervisor
)
...
...
sidekiq_cluster/cli.rb
View file @
e24c9e2d
...
@@ -10,12 +10,10 @@ require 'time'
...
@@ -10,12 +10,10 @@ require 'time'
# we may run into "already initialized" warnings, hence the check.
# we may run into "already initialized" warnings, hence the check.
require_relative
'../lib/gitlab'
unless
Object
.
const_defined?
(
'Gitlab'
)
require_relative
'../lib/gitlab'
unless
Object
.
const_defined?
(
'Gitlab'
)
require_relative
'../lib/gitlab/utils'
require_relative
'../lib/gitlab/utils'
require_relative
'../lib/gitlab/daemon'
require_relative
'../lib/gitlab/sidekiq_config/cli_methods'
require_relative
'../lib/gitlab/sidekiq_config/cli_methods'
require_relative
'../lib/gitlab/sidekiq_config/worker_matcher'
require_relative
'../lib/gitlab/sidekiq_config/worker_matcher'
require_relative
'../lib/gitlab/sidekiq_logging/json_formatter'
require_relative
'../lib/gitlab/sidekiq_logging/json_formatter'
require_relative
'../lib/gitlab/process_management'
require_relative
'../metrics_server/dependencies'
require_relative
'../lib/gitlab/process_supervisor'
require_relative
'../metrics_server/metrics_server'
require_relative
'../metrics_server/metrics_server'
require_relative
'sidekiq_cluster'
require_relative
'sidekiq_cluster'
...
...
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