Commit Graph

61 Commits

Author SHA1 Message Date
GitLab Bot 6d18e2830d Add latest changes from gitlab-org/gitlab@master 2021-04-05 18:09:15 +00:00
GitLab Bot 213bd7e9d3 Add latest changes from gitlab-org/gitlab@master 2021-02-18 12:09:34 +00:00
GitLab Bot 89d84b76a9 Add latest changes from gitlab-org/gitlab@master 2020-12-29 18:10:10 +00:00
GitLab Bot dd240e5cc4 Add latest changes from gitlab-org/gitlab@master 2020-09-30 15:09:46 +00:00
GitLab Bot 0923a94d58 Add latest changes from gitlab-org/gitlab@master 2020-09-14 09:09:34 +00:00
GitLab Bot 537882ad40 Add latest changes from gitlab-org/gitlab@master 2020-09-10 00:08:32 +00:00
GitLab Bot 73add99b1f Add latest changes from gitlab-org/gitlab@master 2020-09-09 09:08:40 +00:00
GitLab Bot 49a897eff9 Add latest changes from gitlab-org/gitlab@master 2020-09-08 09:08:31 +00:00
GitLab Bot 448ff1fb83 Add latest changes from gitlab-org/gitlab@master 2020-07-22 03:09:40 +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 3795b229ab Add latest changes from gitlab-org/gitlab@master 2020-05-01 00:09:59 +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 175b4fa261 Add latest changes from gitlab-org/gitlab@master 2019-12-11 18:08:10 +00:00
GitLab Bot 00c78fb814 Add latest changes from gitlab-org/gitlab@master 2019-10-16 15:06:17 +00:00
GitLab Bot 914ea32e0e Add latest changes from gitlab-org/gitlab@master 2019-10-16 09:07:51 +00:00
Aleksei Lipniagov b4d62471f1 Improve GC_REPORT_BUCKETS granularity 2019-09-03 15:00:34 +03: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
Aleksei Lipniagov 911c0f61b3 Remove :livesum from RubySampler metrics 2019-07-23 15:26:52 +03:00
Aleksei Lipniagov 4029d8b41c Get rid of `worker_label` in RubySampler
We have Prometheus::PidProvider which sets correct worker id for a
process, so such implementation of `worker_label` in the sampler is
obsolete.
2019-07-19 16:55:32 +03:00
Mayra Cabrera 0ab89d8e36 Add a rubocop for Rails.logger
Suggests to use a JSON structured log instead

Related to https://gitlab.com/gitlab-org/gitlab-ce/issues/54102
2019-07-10 19:26:47 +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
Ryan Cobb 7131ad46c6 Adds sidekiq worker label for ruby metrics 2019-06-06 13:19:50 -06: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 e9ae881c9a Remove unnecessary super call in unicorn sampler 2019-06-03 11:18:54 -06: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 17986d91a5 Add back ruby_memory_bytes metric, limit duplication, clean up
This adds back ruby_memory_bytes for backwards compatibility, limits
code duplication, cleans up unused methods, and limits the unicorn
worker sampling scope.
2019-04-29 12:13:02 -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
Sarah Yasonik e6fcdd7aca Update Metrics references to Object path
On reload, references to Metrics within classes in the Gitlab::Metrics
module fail. Update all references to ::Gitlab::Metrics so that
constant lookup finds the right module in development. This fix should
not impact production.
2019-02-14 18:05:35 +00: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
gfyoung 7ec8af5017 Enable even more frozen string for lib/gitlab
Enables frozen string for the following:

* lib/gitlab/hook_data/**/*.rb
* lib/gitlab/i18n/**/*.rb
* lib/gitlab/import/**/*.rb
* lib/gitlab/import_export/**/*.rb
* lib/gitlab/kubernetes/**/*.rb
* lib/gitlab/legacy_github_import/**/*.rb
* lib/gitlab/manifest_import/**/*.rb
* lib/gitlab/metrics/**/*.rb
* lib/gitlab/middleware/**/*.rb

Partially addresses gitlab-org/gitlab-ce#47424.
2018-11-16 17:41:14 -08: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 a8ebed6016 Make `System.monotonic_time` retun seconds represented by float with microsecond precision 2017-12-12 18:12:49 +01:00
Stan Hu 10f5446c33 Remove RubySampler#sample_objects for performance as well 2017-12-11 06:55:59 -08:00