Commit Graph

45 Commits

Author SHA1 Message Date
GitLab Bot 89d84b76a9 Add latest changes from gitlab-org/gitlab@master 2020-12-29 18:10:10 +00:00
GitLab Bot 0923a94d58 Add latest changes from gitlab-org/gitlab@master 2020-09-14 09:09:34 +00:00
GitLab Bot 73add99b1f Add latest changes from gitlab-org/gitlab@master 2020-09-09 09:08:40 +00:00
GitLab Bot 2368893df7 Add latest changes from gitlab-org/gitlab@master 2020-08-31 15:10:41 +00:00
GitLab Bot 448ff1fb83 Add latest changes from gitlab-org/gitlab@master 2020-07-22 03:09:40 +00:00
GitLab Bot c59765a50a Add latest changes from gitlab-org/gitlab@master 2020-06-24 18:09:03 +00:00
GitLab Bot 9c3e48166e Add latest changes from gitlab-org/gitlab@master 2020-05-28 03:08:08 +00:00
GitLab Bot 59accb4c47 Add latest changes from gitlab-org/gitlab@master 2020-05-20 00:08:20 +00:00
GitLab Bot 95ab36cd97 Add latest changes from gitlab-org/gitlab@master 2020-05-15 21:08:21 +00:00
GitLab Bot 868e4e69bb Add latest changes from gitlab-org/gitlab@master 2020-05-13 15:08:23 +00:00
GitLab Bot 0e65189f85 Add latest changes from gitlab-org/gitlab@master 2020-05-13 09:08:37 +00:00
GitLab Bot f35a7a3b8e Add latest changes from gitlab-org/gitlab@master 2020-05-07 15:09:29 +00:00
GitLab Bot 73886079f3 Add latest changes from gitlab-org/gitlab@master 2020-05-06 18:09:38 +00:00
GitLab Bot 0d09054d16 Add latest changes from gitlab-org/gitlab@master 2020-05-05 15:09:42 +00:00
GitLab Bot 3ad11f24ca Add latest changes from gitlab-org/gitlab@master 2019-12-22 09:07:51 +00:00
GitLab Bot 9763c08170 Add latest changes from gitlab-org/gitlab@master 2019-12-17 03:07:45 +00:00
GitLab Bot 784fae4b9d Add latest changes from gitlab-org/gitlab@master 2019-12-12 12:07:33 +00:00
GitLab Bot 175b4fa261 Add latest changes from gitlab-org/gitlab@master 2019-12-11 18:08:10 +00:00
GitLab Bot 25989ab7ef Add latest changes from gitlab-org/gitlab@master 2019-10-18 11:11:44 +00:00
Thong Kuah 8c42a0eac0 Add frozen_string_literal to lib part 2
Using the sed script from
https://gitlab.com/gitlab-org/gitlab-ce/issues/59758
2019-08-23 00:15:24 +12:00
Aleksei Lipniagov 6fc7033725 Remove :puma_phase metrics
We don't use phase restarts, as we use `preload_app`:
https://github.com/puma/puma/blob/master/README.md#clustered-mode
`:puma_phase` values will always be zero.
2019-08-14 17:46:40 +03:00
Aleksei Lipniagov 1f9edb7c4a Call `GC::Profiler.clear` only in one place
Previously, both InfluxSampler and RubySampler were relying on the
`GC::Profiler.total_time` data which is the sum over the list
of captured GC events. Also, both samplers asynchronously called
`GC::Profiler.clear` which led to incorrect metric data because
each sampler has the wrong assumption it is the only object who calls
`GC::Profiler.clear` and thus could rely on the gathered results between
such calls.

We should ensure that `GC::Profiler.total_time` is called only in one
place making it possible to rely on accumulated data between such wipes.

Also, we need to track the amount of profiler reports we lost.
2019-08-02 09:04:32 +00:00
Kamil Trzciński 580368c09b Make unicorn_workers to return meaningful results 2019-07-09 16:06:15 +02:00
Ryan Cobb 04962880ad Fix process start time
Previously we were recording process start time as seconds from boot.
This makes it so we record as epoch time.
2019-07-04 10:24:19 +00:00
Bob Van Landuyt 327cae1da7 Merge branch '61964-unicorn-instrumentation' into 'master'
Adds ruby and unicorn instrumentation

Closes #61964

See merge request gitlab-org/gitlab-ce!28499
2019-06-04 17:59:04 +00:00
Jan Provaznik d4a83ce5a3 Ignore Puma empty worker stats
In some cases (during worker start) it's possible that
Puma.stats returns an empty hash for worker's last status. In
that case we just skip sampling of the worker until these
stats are available.
2019-06-04 09:11:55 +00:00
Ryan Cobb 0393c5059d Merge branch 'master' into 61964-unicorn-instrumentation 2019-05-29 10:56:38 -06:00
Jan Provaznik a5adc6a024 Add Puma sampler
This sampler gathers Puma-specific metrics which can be used by
Prometheus then.
2019-05-29 12:27:44 +00:00
Ryan Cobb 9eeedfccbc Adds ruby and unicorn instrumentation
This adds ruby and unicorn instrumentation. This was originally
intended in 11.11 but due to performance concerns it was reverted. This
new commit foregoes the sys-proctable gem was causing performance issues
previously.
2019-05-20 13:36:59 -06:00
Ryan Cobb 2334b07726 Revert "Merge branch '56850-add-new-unicorn-metrics' into 'master'"
This reverts merge request !27474
2019-05-20 14:34:00 +00:00
Ryan Cobb 8ad7cbf773 Cleanup spec by removing not needed let 2019-04-30 12:26:16 -06:00
Ryan Cobb bb27bf4a1c Update docs and calculate process start time via proc table
This updates monitor docs to reflect the new ruby and unicorn metrics as
well as making it so we fetch process start time via the proc table
instead of via CLOCK_BOOTTIME
2019-04-24 17:05:09 -06:00
Ryan Cobb 174a03dfc2 Move process specific metrics to ruby sampler
These metrics are not unicorn specific and can be used across ruby
processes
2019-04-24 13:01:51 -06:00
Ryan Cobb 4c248c05cb Adds new metrics for unicorn monitoring
This adds new metrics for monitoring unicorn. These metrics include
process_cpu_seconds_total, process_start_time_seconds, process_max_fds,
and unicorn_workers.
2019-04-18 13:46:56 -06:00
Ben Kochie 54438ad04b
Clean up unicorn sampler metric labels
Change `type` and `address` labels to be less generic to avoid conflicts
with other systems.
2019-02-06 14:19:51 +01:00
Ben Kochie 78a9991543
Cleanup ruby sampler metrics
* Use a simple counter for sampler duration instead of a histogram.
* Use a counter to collect GC time.
* Remove unused objects metric.
* Cleanup metric names to match Prometheus conventions.
* Prefix generic GC stats with `gc_stat`.
* Include worker label on memory and file descriptor metrics.
2018-06-22 14:12:22 +02:00
Yorick Peterse d527b46802
Remove remaining traces of the Allocations Gem
In MR https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/15834 we
removed use of the data produced by the Allocations Gem. However, we
never removed the code that just enables tracking of allocations. In
this commit we remove all remaining traces of this Gem.
2018-06-20 15:11:10 +02:00
Pawel Chojnacki 67d4946347 Fix ruby sampler spec 2018-01-29 15:13:05 +01:00
Stan Hu 10f5446c33 Remove RubySampler#sample_objects for performance as well 2017-12-11 06:55:59 -08:00
Stan Hu e1a8e5a509 Remove allocation tracking code from InfluxDB sampler for performance
On GitLab.com, InfluxSampler#sample_objects appears to take 1.2 s or so to
iterate through 1059 objects. This had led to delays of a couple hundred
milliseconds in processing in the main thread. Remove this code since it's not
really being used.

Closes gitlab-com/infrastructure#3250
2017-12-10 21:53:28 -08:00
Pawel Chojnacki f64085e693 Move labels tests from Metrics rack spec to Transaction spec 2017-11-02 18:11:44 +01:00
Pawel Chojnacki 9360f37aae Fix Rubocop warnings 2017-11-02 18:11:44 +01:00
Pawel Chojnacki 38fbd25bbf Ruby sampler spec 2017-11-02 18:11:43 +01:00
Pawel Chojnacki c97dc61a9e Cleanup transaction metrics 2017-11-02 18:11:43 +01:00
Pawel Chojnacki 03b38a4a8d Add GC sampler and small refactor of samplers 2017-11-02 18:09:21 +01:00