{"action":"created","issue":{"url":"https://api.github.com/repos/studentinsights/studentinsights/issues/2295","repository_url":"https://api.github.com/repos/studentinsights/studentinsights","labels_url":"https://api.github.com/repos/studentinsights/studentinsights/issues/2295/labels{/name}","comments_url":"https://api.github.com/repos/studentinsights/studentinsights/issues/2295/comments","events_url":"https://api.github.com/repos/studentinsights/studentinsights/issues/2295/events","html_url":"https://github.com/studentinsights/studentinsights/pull/2295","id":388940894,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM3MDc5NzEw","number":2295,"title":"Update logging to log hashed session and educator identifiers, remove view logging","user":{"login":"kevinrobinson","id":1056957,"node_id":"MDQ6VXNlcjEwNTY5NTc=","avatar_url":"https://avatars3.githubusercontent.com/u/1056957?v=4","gravatar_id":"","url":"https://api.github.com/users/kevinrobinson","html_url":"https://github.com/kevinrobinson","followers_url":"https://api.github.com/users/kevinrobinson/followers","following_url":"https://api.github.com/users/kevinrobinson/following{/other_user}","gists_url":"https://api.github.com/users/kevinrobinson/gists{/gist_id}","starred_url":"https://api.github.com/users/kevinrobinson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kevinrobinson/subscriptions","organizations_url":"https://api.github.com/users/kevinrobinson/orgs","repos_url":"https://api.github.com/users/kevinrobinson/repos","events_url":"https://api.github.com/users/kevinrobinson/events{/privacy}","received_events_url":"https://api.github.com/users/kevinrobinson/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-12-08T17:19:44Z","updated_at":"2018-12-08T17:48:59Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/studentinsights/studentinsights/pulls/2295","html_url":"https://github.com/studentinsights/studentinsights/pull/2295","diff_url":"https://github.com/studentinsights/studentinsights/pull/2295.diff","patch_url":"https://github.com/studentinsights/studentinsights/pull/2295.patch"},"body":"# Who is this PR for?\r\ndevelopers\r\n\r\n# What problem does this PR fix?\r\nWe can't easily see requests across a session when debugging, and there's noise in logs about view rendering that we don't use.\r\n\r\n# What does this PR do?\r\nAdds two log tags for session and educator identifiers.  Both are hashed from the real value using a secret to reduce risk of exposure if logs were leaked, and shortened for legibility.  These values are write-only and never read or used for anything.\r\n\r\n# Screenshot (if adding a client-side feature)\r\nExample of log output, showing request, session and session identifiers.\r\n```\r\n[r:bcf387ed] [s:ca347062] [e:7930d8d2] Started GET \"/home\" for 127.0.0.1 at 2018-12-08 12:13:02 -0500\r\n[r:bcf387ed] [s:ca347062] [e:7930d8d2] Processing by UiController#ui as HTML\r\n[r:bcf387ed] [s:ca347062] [e:7930d8d2] Completed 200 OK in 72ms (Views: 63.5ms | ActiveRecord: 3.2ms)\r\n...\r\n[r:a9b20f92] [s:ca347062] [e:7930d8d2] Started GET \"/api/home/feed_json?educator_id=[FILTERED]&limit=[FILTERED]&time_now=[FILTERED]\" for 127.0.0.1 at 2018-12-08 12:13:04 -0500\r\n[r:a9b20f92] [s:ca347062] [e:7930d8d2] Processing by HomeController#feed_json as JSON\r\n...\r\n[r:42046f1d] [s:ca347062] [e:7930d8d2] Started GET \"/api/home/students_with_high_absences_json?educator_id=[FILTERED]&limit=[FILTERED]\" for 127.0.0.1 at 2018-12-08 12:13:04 -0500\r\n```\r\n\r\nUpdated this so it still logs \"no value\" if these can't be read:\r\n```\r\n[r:11b556ce] [s:] [e:]\r\n```\r\n\r\n# Checklists\r\n*Which features or pages does this PR touch?*\r\n+ [x] Core \r\n\r\n*Does this PR use tests to help verify we can deploy these changes quickly and confidently?*\r\n+ [x] Manual testing made more sense here"},"comment":{"url":"https://api.github.com/repos/studentinsights/studentinsights/issues/comments/445477014","html_url":"https://github.com/studentinsights/studentinsights/pull/2295#issuecomment-445477014","issue_url":"https://api.github.com/repos/studentinsights/studentinsights/issues/2295","id":445477014,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0NTQ3NzAxNA==","user":{"login":"kevinrobinson","id":1056957,"node_id":"MDQ6VXNlcjEwNTY5NTc=","avatar_url":"https://avatars3.githubusercontent.com/u/1056957?v=4","gravatar_id":"","url":"https://api.github.com/users/kevinrobinson","html_url":"https://github.com/kevinrobinson","followers_url":"https://api.github.com/users/kevinrobinson/followers","following_url":"https://api.github.com/users/kevinrobinson/following{/other_user}","gists_url":"https://api.github.com/users/kevinrobinson/gists{/gist_id}","starred_url":"https://api.github.com/users/kevinrobinson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kevinrobinson/subscriptions","organizations_url":"https://api.github.com/users/kevinrobinson/orgs","repos_url":"https://api.github.com/users/kevinrobinson/repos","events_url":"https://api.github.com/users/kevinrobinson/events{/privacy}","received_events_url":"https://api.github.com/users/kevinrobinson/received_events","type":"User","site_admin":false},"created_at":"2018-12-08T17:48:59Z","updated_at":"2018-12-08T17:48:59Z","author_association":"CONTRIBUTOR","body":"selfie"}}
{"actor":{"display_login":"kevinrobinson"}}