Commit graph

19 commits

Author SHA1 Message Date
Stan Hu
204af2e101 Support resetting of Prometheus metrics between test runs
Adding the :prometheus tag to an rspec test will clear out
memory-mapped files and reset the registry.

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/39968
2018-05-09 14:33:42 -07:00
Mario de la Ossa
eaada9d706 use Gitlab::UserSettings directly as a singleton instead of including/extending it 2018-02-02 18:39:55 +00:00
Pawel Chojnacki
b1ba8eb9a2 Do not use include Gitlab::CurrentSettings unnecessarily 2018-01-29 15:13:05 +01:00
Pawel Chojnacki
7d716cc849 Convert InfluxDB to concern. Fix uninitialized metrics when metrics code is inherited. 2018-01-29 15:13:04 +01:00
Pawel Chojnacki
ea6196d490 Move prometheus metrics to module. Use class instance variables for metrics and metrics cache in metrics concern 2018-01-29 15:13:04 +01:00
Pawel Chojnacki
f5383578d9 NullMetric as a singleton 2018-01-29 15:13:04 +01:00
Lin Jen-Shin
9ac0c76b78 Use StrongMemoize and enable/disable cops properly 2017-11-18 01:01:53 +08:00
Lin Jen-Shin
0af35d7e30 Merge remote-tracking branch 'upstream/master' into no-ivar-in-modules
* upstream/master: (507 commits)
  Add dropdowns documentation
  Convert migration to populate latest merge request ID into a background migration
  Set 0.69.0 instead of latest for codeclimate image
  De-duplicate background migration matchers defined in spec/support/migrations_helpers.rb
  Update database_debugging.md
  Update database_debugging.md
  Move installation of apps higher
  Change to Google Kubernetes Cluster and add internal links
  Add Ingress description from official docs
  Add info on creating your own k8s cluster from the cluster page
  Add info about the installed apps in the Cluster docs
  Resolve "lock/confidential issuable sidebar custom svg icons iteration"
  Update HA README.md to clarify GitLab support does not troubleshoot DRBD.
  Update license_finder to 3.1.1
  Make sure NotesActions#noteable returns a Noteable in the update action
  Cache the number of user SSH keys
  Adjust openid_connect_spec to use `raise_error`
  Resolve "Clicking on GPG verification badge jumps to top of the page"
  Add changelog for container repository path update
  Update container repository path reference
  ...
2017-11-17 19:19:06 +08:00
Pawel Chojnacki
77e938a8f9 Avoid using Send (but is it better?) + small rubocop cleanup 2017-11-02 18:11:44 +01:00
Pawel Chojnacki
c361c1e857 Adjust test to changed metrics methods.
+ remove deprecated test suite
2017-11-02 18:11:44 +01:00
Pawel Chojnacki
b4dbc30616 Guard metrics creation with a mutex 2017-11-02 18:11:44 +01:00
Lin Jen-Shin
6a4ee9aa71 Allow simple ivar ||= form. Update accordingly 2017-09-19 01:29:32 +08:00
Lin Jen-Shin
9ae92b8caa Add cop to make sure we don't use ivar in a module 2017-09-18 21:23:45 +08:00
Paweł Chojnacki
2c3d52161a Update Prometheus gem to version that explicitly calls munmap 2017-07-19 08:54:39 +00:00
Paweł Chojnacki
26ac691a68 Instrument Unicorn with Ruby exporter 2017-07-04 15:28:34 +00:00
Pawel Chojnacki
5f2dc999bd use proper if defined? check. 2017-06-20 12:22:56 +02:00
Pawel Chojnacki
ed5c7d11b1 Do not enable prometheus metrics when data folder is not present.
+ Set defaults correctly only for when not in production or staging
+ set ENV['prometheus_multiproc_dir'] in config/boot.rb instead of config.ru

Test prometheus metrics unmemoized
2017-06-19 18:52:23 +02:00
Pawel Chojnacki
7b75004d60 Add missing trailing newlines 2017-06-02 19:45:58 +02:00
Pawel Chojnacki
b668aaf426 Split the metrics implementation to separate modules for Influx and Prometheus 2017-06-02 19:45:58 +02:00