Commit graph

17 commits

Author SHA1 Message Date
GitLab Bot
31a340adab Add latest changes from gitlab-org/gitlab@master 2020-05-15 18:07:52 +00:00
GitLab Bot
c6f0b221b7 Add latest changes from gitlab-org/gitlab@master 2020-05-12 00:10:11 +00:00
GitLab Bot
c6acc1681a Add latest changes from gitlab-org/gitlab@master 2020-04-23 12:09:46 +00:00
GitLab Bot
e33f87ac0f Add latest changes from gitlab-org/gitlab@master 2020-04-21 15:21:10 +00:00
GitLab Bot
603c7d4cac Add latest changes from gitlab-org/gitlab@master 2020-03-24 18:07:55 +00:00
GitLab Bot
f519cec2ad Add latest changes from gitlab-org/gitlab@master 2019-11-22 03:06:14 +00:00
GitLab Bot
7071f9bf3e Add latest changes from gitlab-org/gitlab@master 2019-11-11 15:06:42 +00:00
Stan Hu
e632ae8084 Standardize remote_ip and path keys for auth.log and api_json.log
Current `auth.log` uses `fullpath` and `ip`, while `api_json.log` uses
`remote_ip` and `path` for the same fields. Let's standardize these
namings to make it easier for people working with the data.

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/66167
2019-08-20 18:12:28 +00:00
Stan Hu
1136c0c8e9 Add Rugged calls and duration to API and Rails logs
This adds `rugged_duration_ms` and `rugged_calls` fields to
`api_json.log` and `production_json.log`. This will make it easier to
identify performance issues caused by excessive I/O.

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/64676
2019-07-18 06:53:39 -07:00
Andrew Newdigate
4f4de36cac Migrate correlation and tracing code to LabKit
This change is a fairly straightforward refactor to extract the tracing
and correlation-id code from the gitlab rails codebase into the new
LabKit-Ruby project.

The corresponding import into LabKit-Ruby was in
https://gitlab.com/gitlab-org/labkit-ruby/merge_requests/1

The code itself remains very similar for now.

Extracting it allows us to reuse it in other projects, such as
Gitaly-Ruby. This will give us the advantages of correlation-ids and
distributed tracing in that project too.
2019-04-18 09:57:16 +02:00
Stan Hu
74ff33a3fd Log Gitaly RPC duration to api_json.log and production_json.log
This makes it easier to debug Gitaly performance issues in the field.

This commit also makes the tracking of query time thread-safe via
RequestStore.
2019-03-27 06:01:21 -05: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
gfyoung
ebf98f27c4 Enable even more frozen string in lib/gitlab
Enables frozen string for the following:

* lib/gitlab/fogbugz_import/**/*.rb
* lib/gitlab/gfm/**/*.rb
* lib/gitlab/git/**/*.rb
* lib/gitlab/gitaly_client/**/*.rb
* lib/gitlab/gitlab_import/**/*.rb
* lib/gitlab/google_code_import/**/*.rb
* lib/gitlab/gpg/**/*.rb
* lib/gitlab/grape_logging/**/*.rb
* lib/gitlab/graphql/**/*.rb
* lib/gitlab/graphs/**/*.rb
* lib/gitlab/hashed_storage/**/*.rb
* lib/gitlab/health_checks/**/*.rb

Partially address gitlab-org/gitlab-ce#47424.
2018-11-13 11:42:15 -08:00
Andrew Newdigate
189b063ee1 Add route information to lograge structured logging 2018-09-05 10:01:26 +01:00
Andrew Newdigate
a62a65b869 Add gitaly_calls to API structured logs 2018-09-04 17:14:22 +00:00
Stan Hu
16e04e006c Log queue duration for Grape API calls
This mimics the same thing the RailsQueueDuration does for Rails controller
requests and will help diagnose issues with API delays.

Closes #46601
2018-05-28 13:56:42 -07:00
Stan Hu
eaf9088ba8 Save user ID and username in Grape API log (api_json.log)
This will enable admins to identify who actually made the API request.

Relates to #36960
2018-01-08 21:23:24 -08:00