Skip to content

Add route information to lograge structured logging for API logs

Andrew Newdigate requested to merge an/api-route-logger into master

What does this MR do?

Adds route information to structured API logs:

{
  "time": "2018-09-04T21:19:41.251Z",
  "severity": "INFO",
  "duration": 745.27,
  "db": 20.84,
  "view": 724.43,
  "status": 200,
  "method": "GET",
  "path": "/api/v4/projects",
  "params": {},
  "host": "localhost",
  "ip": "127.0.0.1",
  "ua": "curl/7.54.0",
  "route": "/api/:version/projects",
  "queue_duration": 25721.68,
  "gitaly_calls": 18
}

Specifically, this change adds the "route" attribute.

What are the relevant issue numbers?

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/50993

Does this MR meet the acceptance criteria?

Edited by Andrew Newdigate

Merge request reports