Commit graph

7 commits

Author SHA1 Message Date
Stan Hu
69246ec8d2 Bump lograge to 0.10.0 and remove monkey patch
lograge 0.10.0 contains the `Location` query string fix in
https://github.com/roidrage/lograge/pull/241 among other minor changes:
https://github.com/roidrage/lograge/blob/master/CHANGELOG.md
2018-04-23 13:00:02 -07:00
Stan Hu
467aa65e11 Strip any query string parameters from Location headers from lograge
Port of https://github.com/roidrage/lograge/pull/241
2018-03-20 16:38:36 -07:00
Andrew Newdigate
e62a6cca08 Fix for open-ended parameter's in lograge causing elastic memory issues 2018-02-28 15:45:41 +00:00
Andrew Newdigate
64d7ec0a9e Detect n+1 issues involving Gitaly 2017-09-19 10:55:37 +00:00
Stan Hu
9bc176b2c3 Add remote IP, user ID and username to JSON lograge output
This makes the logs a bit more useful to search requests by users.
2017-07-28 00:48:03 -05:00
Stan Hu
68529f4f80 Standardize on ISO8601 UTC time for lograge 2017-07-20 07:58:01 -07:00
Stan Hu
e2b1c16ade Add structured logging for Rails processes
This introduces JSON logging for Rails views saved to a file called
`development_json.log`, `production_json.log`, etc.

For example, instead of this unparsable log:

```
Started GET "/" for 127.0.0.1 at 2012-03-10 14:28:14 +0100
Processing by HomeController#index as HTML
  Rendered text template within layouts/application (0.0ms)
  Rendered layouts/_assets.html.erb (2.0ms)
  Rendered layouts/_top.html.erb (2.6ms)
  Rendered layouts/_about.html.erb (0.3ms)
  Rendered layouts/_google_analytics.html.erb (0.4ms)
Completed 200 OK in 79ms (Views: 78.8ms | ActiveRecord: 0.0ms)
```

We get a single line with this:

```
{"method":"GET","path":"/,"format":"html","controller":"HomeController","action":"index","status":200,"duration":79,"view":78.8,"db":0.0,"location":"http://localhost/","time":"2017-07-18 09:35:17 -0700"}
```

Part of #20060
2017-07-18 09:49:21 -07:00