Project

General

Profile

Actions

Feature #10029

closed

[Workbench] Send a request ID with each API request so it's visible in the API logs

Added by Tom Clegg over 7 years ago. Updated over 7 years ago.

Status:
Resolved
Priority:
Normal
Assigned To:
Category:
Workbench
Target version:
Story points:
1.0

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.


Subtasks 1 (0 open1 closed)

Task #10076: Review 10029-wb-send-request-idResolvedRadhika Chippada09/13/2016Actions

Related issues

Related to Arvados - Idea #12512: [Workbench] Implement X-Request-ID to enable request tracingResolvedTom Clegg10/30/2017Actions
Actions #1

Updated by Tom Clegg over 7 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
Actions #2

Updated by Tom Clegg over 7 years ago

  • Description updated (diff)
Actions #3

Updated by Tom Clegg over 7 years ago

  • Description updated (diff)
Actions #4

Updated by Tom Morris over 7 years ago

  • Target version changed from Arvados Future Sprints to 2016-09-28 sprint
Actions #5

Updated by Lucas Di Pentima over 7 years ago

  • Assigned To set to Lucas Di Pentima
Actions #6

Updated by Lucas Di Pentima over 7 years ago

  • Status changed from New to In Progress
Actions #7

Updated by Lucas Di Pentima over 7 years ago

78fedce

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/

Actions #8

Updated by Radhika Chippada over 7 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.
Actions #9

Updated by Lucas Di Pentima over 7 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

Actions #10

Updated by Radhika Chippada over 7 years ago

LGTM

Actions #11

Updated by Lucas Di Pentima over 7 years ago

  • Status changed from In Progress to Resolved
  • % Done changed from 0 to 100

Applied in changeset arvados|commit:6dea18bd99022c09d51ef647482e080b4f316542.

Actions

Also available in: Atom PDF