Commit Graph

19 Commits

Author SHA1 Message Date
GitLab Bot bdca097916 Add latest changes from gitlab-org/gitlab@master 2020-08-11 03:11:00 +00:00
GitLab Bot e5d314d432 Add latest changes from gitlab-org/gitlab@master 2020-07-03 15:09:13 +00:00
GitLab Bot c59765a50a Add latest changes from gitlab-org/gitlab@master 2020-06-24 18:09:03 +00:00
GitLab Bot 0211553b0c Add latest changes from gitlab-org/gitlab@master 2020-06-10 12:08:58 +00:00
GitLab Bot 607646ef52 Add latest changes from gitlab-org/gitlab@master 2020-06-03 12:08:21 +00:00
GitLab Bot 3795b229ab Add latest changes from gitlab-org/gitlab@master 2020-05-01 00:09:59 +00:00
GitLab Bot 101c30f4df Add latest changes from gitlab-org/gitlab@master 2020-03-26 00:07:58 +00:00
GitLab Bot 2711c26bea Add latest changes from gitlab-org/gitlab@master 2020-03-24 00:09:24 +00:00
GitLab Bot 784fae4b9d Add latest changes from gitlab-org/gitlab@master 2019-12-12 12:07:33 +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
David Wilkins 467a411e88 Convert RestClient to Gitlab::HTTP for Prometheus Monitor
- Closes #60024

- Change PrometheusClient.new to accept a base url instead of an
  already created RestClient

- Use Gitlab::HTTP in PrometheusClient instead of creating RestClient
  in PrometheusService

- Move http_options from PrometheusService to
  PrometheusClient (follow_redirects: false)

- ensure that base urls don't have the trailing slash

- Created a `PrometheusClient#url` method that might not be strictly
  required

- Change rescued exceptions from RestClient::* to
  HTTParty::ResponseError where possible and StandardError for the
  rest
2019-08-07 02:42:20 +00:00
Reuben Pereira 7f529353e7 Add a proxy method to PrometheusClient
- Also refactor the get and json_api_get methods so that the get method
can be reused by the new proxy method.
- The new proxy method makes no changes to the request to the prometheus
server and response from the prometheus server. This allows it to be
used as a proxy to the Prometheus server, hence the name.
2019-04-05 08:05:54 +00:00
Peter Leitzen 552d38861a Automatically set Prometheus step interval
By computing the step interval passed to the query_range Prometheus API
call we improve the performance on the Prometheus server and GitLab by
reducing the amount of data points sent back and prevent Prometheus
from sending errors when requesting longer intervals.
2019-04-04 15:38:37 +00:00
Paweł Chojnacki 0e97eca1d8 Backport custom metrics ce components 2018-02-23 17:58:40 +00:00
Pawel Chojnacki 0e90284c11 Catch json parsing error as PrometheusError 2018-02-07 02:25:54 +01:00
Pawel Chojnacki 9c0b10da41 Fix prometheus client tests 2018-01-04 03:13:54 +01:00
Rémy Coutable ddccd24c13 Remove superfluous lib: true, type: redis, service: true, models: true, services: true, no_db: true, api: true
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-07-27 14:31:53 +02:00
Pawel Chojnacki 9ccda90127 Add Prometheus client tests 2017-05-30 15:27:51 +02:00
Pawel Chojnacki 4f824d2aec Custom queries for prometheus
- Tests for prometheus queries

- fix rubocop warnings

- Remove unused method. Add more queries to deployment queries.

- Wrap BaseQuery in module hierarchy

Renname Prometheus class to PrometheusClient
2017-05-11 23:07:12 +02:00
Renamed from spec/lib/gitlab/prometheus_spec.rb (Browse further)