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
Enhance plugin logging to provide more context information and request IDs #9853
base: develop
Are you sure you want to change the base?
Enhance plugin logging to provide more context information and request IDs #9853
Changes from 17 commits
1854c5e
e02b9fd
6a97436
62a094d
c739949
f48b470
82602b9
819ef17
b70f125
708e13f
0f697a6
7f5955d
fdbcfd7
e4b1b11
6dd09ed
7e20321
3927d38
d16d5c5
c47ea0c
9b5374f
13933bb
c2a0813
269930d
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.
Nothing to do with this PR in particular, but when we started the re-engineering project, and added
src
with the DI container, I was really hoping that we'd be able to refactor the whole plugin to work that way. Thus this feels like a hack, but I understand it is necessary.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.
I wasn't aware about it, but sounds interesting. I think we way
src
is made to work is much easier to follow than the long lists ofinclude
orrequire
operators in the other parts of plugin code.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.
Small suggestion here, but could we add a string like
JSON:
at the beginning here? Then the parser would not be required to guess whether it is JSON that should be parsed.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.
Done in 13933bb
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.
Now that we have the context, do we need to log things here as separate entries?
I imagine that we could store everything in context, and then only call
log()
once, either for the error, or successful response.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.
I think it can be done in the next optimisation. I see the point, that we can log one
Request
object, but I'd do that if we use a similar object internally. However I think we can follow the structure ofremote_request
arguments when logging.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.
Done in d16d5c5
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.
After implementing the change I've noticed that we log redacted version of the arguments. I will update it, to follow the same structure, but use redacted data.
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.
Done in c47ea0c