Commit Graph

17 Commits

Author SHA1 Message Date
GitLab Bot 27f5b61b11 Add latest changes from gitlab-org/gitlab@master 2021-10-18 21:12:56 +00:00
GitLab Bot c3524d16b2 Add latest changes from gitlab-org/gitlab@master 2021-10-07 15:12:00 +00:00
GitLab Bot a8476fe0cd Add latest changes from gitlab-org/gitlab@master 2021-06-15 18:09:57 +00:00
GitLab Bot e5e0589e09 Add latest changes from gitlab-org/gitlab@master 2021-04-26 12:09:44 +00:00
GitLab Bot 4f0f7d5809 Add latest changes from gitlab-org/gitlab@master 2020-12-08 15:09:45 +00:00
GitLab Bot c417764f00 Add latest changes from gitlab-org/gitlab@master 2020-07-07 09:08:57 +00:00
GitLab Bot 691ed55a05 Add latest changes from gitlab-org/gitlab@master 2020-07-06 18:09:13 +00:00
GitLab Bot ce06ce825b Add latest changes from gitlab-org/gitlab@master 2020-07-06 15:08:42 +00:00
GitLab Bot 9fc7cdf0b7 Add latest changes from gitlab-org/gitlab@master 2020-07-06 12:09:00 +00:00
dineshpanda e908e11776 Avoid calling freeze on already frozen strings in lib/gitlab 2019-09-04 09:52:02 +05:30
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
Yorick Peterse d73e68deb5
Limit the action suffixes in transaction metrics
There seem to be a lot of cases where the suffix of an action (e.g.
".html") is set to bogus data, such as "*/*" or entire URLs. This can
increase cardinality of our metrics, and isn't very useful for
monitoring and filtering. To work around this, we enforce a whitelist
containing a few suffixes we actually care about. Suffixes not supported
will be grouped under the action without a suffix. This means that a
request to "FooController#bar.jpeg" will be assigned to
"FooController#bar".
2018-06-20 14:35:04 +02:00
Yorick Peterse 33af33d7cb
Fix GPM content types for Doorkeeper
Certain controllers (e.g. Doorkeeper::TokensController) don't expose the
method "request_format". This commit changes
Gitlab::Metrics::WebTransaction so we don't rely on this method, instead
using the underlying code this method uses.

Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/46412
2018-05-16 12:53:54 +02:00
Yorick Peterse c003337729
Fix setting Gitlab metrics content types
The method "content_type" on a controller does not always return the
correct content type. On the other hand, the method "request_format"
does _and_ immediately returns a Symbol (e.g. :json) instead of a
mime-type name (e.g. application/json). With these changes metrics
should again report their action names correctly.

Fixes https://gitlab.com/gitlab-com/infrastructure/issues/3499
2018-05-15 17:38:39 +02:00
Pawel Chojnacki 30a4bb6628 Fix sidekiq middleware tests 2017-11-02 18:16:58 +01:00
Pawel Chojnacki 534f6b1125 Tests for Web transaction and remove simple transacton 2017-11-02 18:11:44 +01:00
Pawel Chojnacki 929418da32 Web/Sidekiq transaction split 2017-11-02 18:11:44 +01:00