Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add correlation ids #20
add correlation ids #20
Changes from 16 commits
0e4d3c4
f8b8f7b
9f05650
1b451c7
b3b59fe
0c63dcc
c8778b3
11cea83
27363bd
3197f33
fddf672
376bd6d
2e733a3
8a80b70
a69274e
2fba585
549b10c
716448b
1307245
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this safe to do? When multiple API calls arrive aren't them executed concurrently and sharing the same router object?
even it this was safe looks like an anti-pattern to me: request-related stuff should stay inside request's context. What's this r.l used for anyway?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We set a modified logger to the context in the
CorrelationIDMiddleware
function. Intention is to use this logger everywhere. As the api server uses the logger from router, I'm changing the router logger (r.l) to use the logger from context.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that's ok
I don't get why we need a router logger (+ I'm still concerned about concurrency safety)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cc @gsora @sahith-narahari