Commit Graph

13 Commits

Author SHA1 Message Date
Andrew Newdigate 2c0d69d310 Extract process_name from GitLab::Sentry
GitLab::Sentry has a program_context method to determine whether a
Sentry exception occurred in Sidekiq or rails. Since we will need
similar functionality for distributed tracing, this change extracts the
program_context method into GitLab.process_name for more general
consumption.
2019-01-16 15:29:05 +02:00
Kamil Trzciński ebb5d9f4db Revert "Prefer to use correlation-id in logs"
This reverts commit 3560b11922.
2018-12-06 21:46:31 +01:00
Kamil Trzciński 3560b11922 Prefer to use correlation-id in logs
This changes `correlation_id` to be `correlation-id` when passed via jobs
2018-12-06 20:49:31 +01:00
Kamil Trzciński 39c1731a53 Log and pass correlation-id between Unicorn, Sidekiq and Gitaly
The Correlation ID is taken or generated from received X-Request-ID.
Then it is being passed to all executed services (sidekiq workers
or gitaly calls).

The Correlation ID is logged in all structured logs as `correlation_id`.
2018-12-06 20:46:14 +01:00
Dylan Griffith ba7cfdc2d7 Track Kubernetes errors using Sentry 2018-11-14 11:10:36 +00:00
gfyoung c858f70d07 Enable frozen string for lib/gitlab/*.rb 2018-10-22 07:00:50 +00:00
Bob Van Landuyt 5f7f5eda92 Method to track recoverable exceptions in sentry
This adds a method to track errors that can be recovered from in
sentry.

It is useful when debugging performance issues, or exceptions that are
hard to reproduce.
2018-04-17 11:39:23 +02: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
Douwe Maan dceb2112d2 Merge branch 'bvl-validate-po-files' into 'master'
Validate PO files in static analysis

See merge request !13000
2017-09-01 14:30:43 +00:00
Sean McGivern 5883ce95ef `current_application_settings` belongs on `Gitlab::CurrentSettings`
The initializers including this were doing so at the top level, so every object
loaded after them had a `current_application_settings` method. However, if
someone had rack-attack enabled (which was loaded before these initializers), it
would try to load the API, and fail, because `Gitlab::CurrentSettings` didn't
have that method.

To fix this:

1. Don't include `Gitlab::CurrentSettings` at the top level. We do not need
   `Object.new.current_application_settings` to work.
2. Make `Gitlab::CurrentSettings` explicitly `extend self`, as we already use it
   like that in several places.
3. Change the initializers to use that new form.
2017-08-31 13:38:33 +01:00
Bob Van Landuyt b6646e778d Track the locale in Sentry so we know which ones are failing 2017-08-31 14:10:04 +02:00
Rémy Coutable 3db37e0562 Enable the Style/TrailingCommaInArguments cop
Use the EnforcedStyleForMultiline: no_comma option.

Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-05-10 18:25:45 +02:00
Stan Hu 0fe4cf2b0f Fix Sentry not reporting right program for Sidekiq workers
Moves program tag into the global configuration since this doesn't
change and since Sidekiq workers get a unique context for each event.

Closes #21410
2016-08-25 19:42:52 -07:00