-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Struct log for adapter call sites #4189
Merged
nathaniel-may
merged 16 commits into
feature/structured-logging
from
call_sites_adapters
Nov 8, 2021
Merged
Changes from 11 commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
5c9fd07
init
1015b89
Initial structured logging work with `fire_event` (#4137)
a3dc5ef
context call sites (#4164)
emmyoop 87b8ca9
Handle exec info (#4168)
e29db58
Client call sites (#4163)
d2f0e2d
Change Graph logger call sites (#4165)
5f336b0
WIP call sites for adapters
iknox-fa fed2419
moar progress
iknox-fa b3517c6
Almost complete
iknox-fa 7706352
test fix
iknox-fa 1dc7ee7
comments
iknox-fa 5cf2927
PR feedback
iknox-fa 2e59a5f
PR feedback
iknox-fa 3a0d8f1
missed a spot
iknox-fa 499c3dd
missed another spot
iknox-fa 8bb7db6
merge feature/structured-logging
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
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.
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.
OH I see what
lazy_log
is doing here. I think it's guarding against log levels. If we're on info level, but this is debug level, because of strict evaluation, the long runningdump graph
will get called even though the message will never be displayed. The way the event module works right now, we force the message early so lazy logging won't help. I think this might be worth solving insidefire_event
so we as developers don't have to decide whether the construction of a message is long running or not, it only constructs each message as they are needed.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 being said... we're going to have the same problem with creating the event type. That will evaluate
self.dump_graph()
as part of__init__
. We should change the event types to take a function value instead, and apply the empty arguments at message creation time. Let's cache it in the event type so it doesn't have to be called again.We're basically threading laziness farther down the pipeline.