Skip to content
This repository has been archived by the owner on May 7, 2021. It is now read-only.

Add UUID to the logs per session #56

Merged
merged 4 commits into from
Apr 2, 2020
Merged

Add UUID to the logs per session #56

merged 4 commits into from
Apr 2, 2020

Conversation

pcraig3
Copy link
Contributor

@pcraig3 pcraig3 commented Apr 2, 2020

This PR adds an id to the session per user, and then adds the id to the logs in production.

The way to clear your session is to visit the /clear URL, which removes the session and then you will get a new ID.

Here's what the logs look like in prod for the first two URLs.

{"id":"aeed59d0-fd59-4c3c-ba07-329af770b00f","method":"GET","url":"/","status":"302","response-time":"12.792ms","timestamp":"2020-04-02T16:19:35.214Z","content-length":"62","user-agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36","version":"27a2b9ba50c27f841138994c4d2484dc4452425e"}
{"id":"aeed59d0-fd59-4c3c-ba07-329af770b00f","method":"GET","url":"/en/start","status":"200","response-time":"66.800ms","timestamp":"2020-04-02T16:19:35.289Z","user-agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36","version":"27a2b9ba50c27f841138994c4d2484dc4452425e"}

Added the UUID package because it has like a bazillion downloads.

Closes #46

@pcraig3 pcraig3 requested a review from dsamojlenko April 2, 2020 16:22
@pcraig3 pcraig3 merged commit 4b88114 into master Apr 2, 2020
@pcraig3 pcraig3 deleted the uuid-per-session branch April 2, 2020 16:26
@pcraig3
Copy link
Contributor Author

pcraig3 commented Apr 2, 2020

boom 💥

@dsamojlenko dsamojlenko mentioned this pull request Apr 2, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Session ID to logs
2 participants