Commit graph

18 commits

Author SHA1 Message Date
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
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
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
Pawel Chojnacki
ee22a47d62 Update prometheus-client-mmap gem to highly optimized version
+ change string concatenation to help with GC pressure.
+ fix metric producing incompatible label sets
2017-12-07 17:47:23 +01:00
Jacopo
181cd299f9 Adds Rubocop rule for line break after guard clause
Adds a rubocop rule (with autocorrect) to ensure line break after guard clauses.
2017-11-16 17:58:29 +01:00
Pawel Chojnacki
043545de3a Remove unnecessary namespace use 2017-11-02 18:11:44 +01:00
Pawel Chojnacki
3cc28601f3 Cleanup sampling code and fix bug with samplers running without sleep 2017-11-02 18:10:57 +01:00
Pawel Chojnacki
3b1464803b Transaction and method instrumentation 2017-11-02 18:10:42 +01:00
Pawel Chojnacki
4c04444e22 Finished Ruby Sampler
+ Cleanup sampler, use latest Prometheus gem
2017-11-02 18:10:20 +01:00
Pawel Chojnacki
0bfe79019d Add samples total and cleanup 2017-11-02 18:09:21 +01:00
Pawel Chojnacki
03b38a4a8d Add GC sampler and small refactor of samplers 2017-11-02 18:09:21 +01:00