Feature #10029
closed[Workbench] Send a request ID with each API request so it's visible in the API logs
Description
The ID should be "timestamp-random" where timestamp is the UNIX epoch when the Workbench Rails server started processing its request and "random" is 9 random digits. This same ID should be included as a "client_session_id" param with every API call that gets made while working on that request.
It should be added to the params hash before real params, so it shows up reliably in the API logs, even params_truncated.
It should also be included as "client_session_id" in Workbench's own request log.
Updated by Tom Clegg over 8 years ago
- Subject changed from [Workbench] Send a request ID to each API request so it's visible in the API logs to [Workbench] Send a request ID with each API request so it's visible in the API logs
Updated by Tom Morris over 8 years ago
- Target version changed from Arvados Future Sprints to 2016-09-28 sprint
Updated by Lucas Di Pentima over 8 years ago
- Assigned To set to Lucas Di Pentima
Updated by Lucas Di Pentima over 8 years ago
- Status changed from New to In Progress
Updated by Lucas Di Pentima over 8 years ago
Added session_client_id
on workbench's lograge and also on requests to the API server.
Complete tests being run at: https://ci.curoverse.com/job/developer-test-job/197/
Updated by Radhika Chippada over 8 years ago
- I am wondering if it would be better if we move set_client_session_id filter to come before other filters such as find_object_by_uuid
- It appears that client_session_id is being sent even without the lograge update. Why do we need this?
- Please unpyramid the lines in this test
test "requesting to the API server includes client_session_id param" do - use_token :active do + use_token :active
- Do we need to clear the client_session_id in thread_clear?
- Nit: As a general practice, I prefer to add new stuff at the bottom of the file, or at an appropriate place to help preserve the flow of the file readability.
Updated by Lucas Di Pentima over 8 years ago
Radhika Chippada wrote:
- I am wondering if it would be better if we move set_client_session_id filter to come before other filters such as find_object_by_uuid
Changed as a prepend_before_filter as Tom requested.
- It appears that client_session_id is being sent even without the lograge update. Why do we need this?
Yes, but the log line indicating the currect workbench request didn't include the request_id
- Please unpyramid the lines in this test
Done
- Do we need to clear the client_session_id in thread_clear?
Cleared after lograge uses it, thanks to Tom for that idea!
- Nit: As a general practice, I prefer to add new stuff at the bottom of the file, or at an appropriate place to help preserve the flow of the file readability.
Updated!
Updates at: ff71d32
Updated by Lucas Di Pentima about 8 years ago
- Status changed from In Progress to Resolved
- % Done changed from 0 to 100
Applied in changeset arvados|commit:6dea18bd99022c09d51ef647482e080b4f316542.