Commit Graph

9 Commits

Author SHA1 Message Date
GitLab Bot da576e4a0b Add latest changes from gitlab-org/gitlab@master 2022-11-08 18:11:09 +00:00
GitLab Bot aaedbff77d Add latest changes from gitlab-org/gitlab@master 2022-09-22 21:10:24 +00:00
GitLab Bot cffe2c2c34 Add latest changes from gitlab-org/gitlab@master 2022-05-16 21:09:09 +00:00
GitLab Bot 6d82b3a0c5 Add latest changes from gitlab-org/gitlab@master 2022-04-27 15:10:01 +00:00
GitLab Bot 889bf7a0ee Add latest changes from gitlab-org/gitlab@master 2021-03-16 18:11:53 +00:00
GitLab Bot 0b48416b38 Add latest changes from gitlab-org/gitlab@master 2021-03-08 00:09:10 +00:00
gfyoung f93f8f569d Enable even more frozen string for lib/gitlab
Enables frozen string for the following:

* lib/gitlab/patch/**/*.rb
* lib/gitlab/popen/**/*.rb
* lib/gitlab/profiler/**/*.rb
* lib/gitlab/project_authorizations/**/*.rb
* lib/gitlab/prometheus/**/*.rb
* lib/gitlab/query_limiting/**/*.rb
* lib/gitlab/quick_actions/**/*.rb
* lib/gitlab/redis/**/*.rb
* lib/gitlab/request_profiler/**/*.rb
* lib/gitlab/search/**/*.rb
* lib/gitlab/sherlock/**/*.rb
* lib/gitlab/sidekiq_middleware/**/*.rb
* lib/gitlab/slash_commands/**/*.rb
* lib/gitlab/sql/**/*.rb
* lib/gitlab/template/**/*.rb
* lib/gitlab/testing/**/*.rb
* lib/gitlab/utils/**/*.rb
* lib/gitlab/webpack/**/*.rb

Partially addresses gitlab-org/gitlab-ce#47424.
2018-11-19 18:24:22 -08:00
Yorick Peterse e3bd674e81
Remove Sentry reporting for query limiting
Using Sentry, while useful, poses two problems you have to choose from:

1. All errors are reported separately, making it easy to create issues
   but also making it next to impossible to see other errors (due to the
   sheer volume of threshold errors).

2. Errors can be grouped or merged together, reducing the noise. This
   however also means it's (as far as I can tell) much harder to
   automatically create GitLab issues from Sentry for the offending
   controllers.

Since both solutions are terrible I decided to go with a third option:
not using Sentry for this at all. Instead we'll investigate using
Prometheus alerts and Grafana dashboards for this, which has the added
benefit of being able to more accurately measure the behaviour over
time.

Note that throwing errors in test environments is still enabled, and
whitelisting is still necessary to prevent that from happening (and that
in turn still requires that developers create issues).
2018-02-13 17:26:59 +01:00
Yorick Peterse cca61980d5
Track and act upon the number of executed queries
This ensures that we have more visibility in the number of SQL queries
that are executed in web requests. The current threshold is hardcoded to
100 as we will rarely (maybe once or twice) change it.

In production and development we use Sentry if enabled, in the test
environment we raise an error. This feature is also only enabled in
production/staging when running on GitLab.com as it's not very useful to
other users.
2018-02-01 17:00:46 +01:00