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
78e60903
Commit
78e60903
authored
Feb 06, 2019
by
GitLab Bot
Browse files
Options
Browse Files
Download
Plain Diff
Automatic merge of gitlab-org/gitlab-ce master
parents
84a8c9bc
e059cca4
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
6 deletions
+13
-6
changelogs/unreleased/56788-unicorn-metric-labels.yml
changelogs/unreleased/56788-unicorn-metric-labels.yml
+5
-0
doc/administration/monitoring/prometheus/gitlab_metrics.md
doc/administration/monitoring/prometheus/gitlab_metrics.md
+2
-0
lib/gitlab/metrics/samplers/unicorn_sampler.rb
lib/gitlab/metrics/samplers/unicorn_sampler.rb
+4
-4
spec/lib/gitlab/metrics/samplers/unicorn_sampler_spec.rb
spec/lib/gitlab/metrics/samplers/unicorn_sampler_spec.rb
+2
-2
No files found.
changelogs/unreleased/56788-unicorn-metric-labels.yml
0 → 100644
View file @
78e60903
---
title
:
Clean up unicorn sampler metric labels
merge_request
:
24626
author
:
bjk-gitlab
type
:
fixed
doc/administration/monitoring/prometheus/gitlab_metrics.md
View file @
78e60903
...
...
@@ -48,6 +48,8 @@ The following metrics are available:
| upload_file_does_not_exist | Counter | 10.7 in EE, 11.5 in CE | Number of times an upload record could not find its file |
| failed_login_captcha_total | Gauge | 11.0 | Counter of failed CAPTCHA attempts during login |
| successful_login_captcha_total | Gauge | 11.0 | Counter of successful CAPTCHA attempts during login |
| unicorn_active_connections | Gauge | 11.0 | The number of active Unicorn connections (workers) |
| unicorn_queued_connections | Gauge | 11.0 | The number of queued Unicorn connections |
## Sidekiq Metrics available
...
...
lib/gitlab/metrics/samplers/unicorn_sampler.rb
View file @
78e60903
...
...
@@ -23,13 +23,13 @@ module Gitlab
def
sample
Raindrops
::
Linux
.
tcp_listener_stats
(
tcp_listeners
).
each
do
|
addr
,
stats
|
unicorn_active_connections
.
set
({
type:
'tcp'
,
address:
addr
},
stats
.
active
)
unicorn_queued_connections
.
set
({
type:
'tcp'
,
address:
addr
},
stats
.
queued
)
unicorn_active_connections
.
set
({
socket_type:
'tcp'
,
socket_
address:
addr
},
stats
.
active
)
unicorn_queued_connections
.
set
({
socket_type:
'tcp'
,
socket_
address:
addr
},
stats
.
queued
)
end
Raindrops
::
Linux
.
unix_listener_stats
(
unix_listeners
).
each
do
|
addr
,
stats
|
unicorn_active_connections
.
set
({
type:
'unix'
,
address:
addr
},
stats
.
active
)
unicorn_queued_connections
.
set
({
type:
'unix'
,
address:
addr
},
stats
.
queued
)
unicorn_active_connections
.
set
({
socket_type:
'unix'
,
socket_
address:
addr
},
stats
.
active
)
unicorn_queued_connections
.
set
({
socket_type:
'unix'
,
socket_
address:
addr
},
stats
.
queued
)
end
end
...
...
spec/lib/gitlab/metrics/samplers/unicorn_sampler_spec.rb
View file @
78e60903
...
...
@@ -37,7 +37,7 @@ describe Gitlab::Metrics::Samplers::UnicornSampler do
end
it
'updates metrics type unix and with addr'
do
labels
=
{
type:
'unix'
,
address:
socket_address
}
labels
=
{
socket_type:
'unix'
,
socket_
address:
socket_address
}
expect
(
subject
).
to
receive_message_chain
(
:unicorn_active_connections
,
:set
).
with
(
labels
,
'active'
)
expect
(
subject
).
to
receive_message_chain
(
:unicorn_queued_connections
,
:set
).
with
(
labels
,
'queued'
)
...
...
@@ -69,7 +69,7 @@ describe Gitlab::Metrics::Samplers::UnicornSampler do
end
it
'updates metrics type unix and with addr'
do
labels
=
{
type:
'tcp'
,
address:
tcp_socket_address
}
labels
=
{
socket_type:
'tcp'
,
socket_
address:
tcp_socket_address
}
expect
(
subject
).
to
receive_message_chain
(
:unicorn_active_connections
,
:set
).
with
(
labels
,
'active'
)
expect
(
subject
).
to
receive_message_chain
(
:unicorn_queued_connections
,
:set
).
with
(
labels
,
'queued'
)
...
...
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