12167: Improve request-id tracking in Workbench.
authorTom Clegg <tclegg@veritasgenetics.com>
Tue, 31 Oct 2017 03:07:52 +0000 (23:07 -0400)
committerTom Clegg <tclegg@veritasgenetics.com>
Tue, 31 Oct 2017 20:37:53 +0000 (16:37 -0400)
commit0e12d049716003b08c4fc881343ebf14c3522b99
treef361d3e21a49773006f324d0728620c9b727ab92
parentf8067ef415fd66a92f9a0e957e8384445af92a6a
12167: Improve request-id tracking in Workbench.

Include current request ID in API requests via X-Request-Id header
instead of a form parameter.  (Also move Arvados API token from form
to Authorization request header.)

Always log request ID as its own field, instead of adding it to params
(where it might get truncated before being logged).

Use new request ID format: "req-" + 20-random-alphanum-chars.

Use an around_filter to set/clear the current request ID in one place,
instead of setting it in controller code and clearing it in logging
code.

Return request ID to browser via X-Request-Id header.

Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tclegg@veritasgenetics.com>
apps/workbench/Gemfile.lock
apps/workbench/app/controllers/application_controller.rb
apps/workbench/app/models/arvados_api_client.rb
apps/workbench/config/initializers/lograge.rb
apps/workbench/test/controllers/application_controller_test.rb