-
Notifications
You must be signed in to change notification settings - Fork 97
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 option to send stdout
as node/operator output
#388
Conversation
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 like the idea that you can subscribe to log outputs of other operators/nodes, but I'm not sure if the special op/logs
output is the best approach for this. How about we introduce a node-level capture_logs
switch to enable the sending of the DoraEvent::Logs
messages? This way, it would be more obvious that some dora-provided functionality is used.
For subscribers we could make the logs available through a new built-in input stream, e.g. named dora/logs/<node_id>
. This would make it clear that this is some data provided by dora, not a normal node/operator output.
What do you think? I can implement the above if you like.
Commenting on Sure thing if you want to do the implementation |
Good point! How about we introduce a Apart from the syntax that we want to use, there is a second challenge. Right now we capture the output per node, not per operator. So the operator logs would also contain the outputs of other operators on that node. Ideally we would split the output properly, but this is difficult sind stdout is set per process. Maybe we can make the dora runtime print special separator messages before and after calling into an operator, which the daemon could then use to split the split the output by operator... I'll look into it. |
Okay! I think that this can also be useful for Opentelemetry logs in the future to tag log at the operator level as well. Shall we maybe merge a first version at custom nodes level first? We can then prioritize operator level in the future? |
Sure, I'm fine with that. |
I opened a draft PR at #392 to add a new I decided for |
Sure! I think we can separate stdout and log. FYI, for python, we can do something in the likes of |
Ah, that's nice! |
Maybe we can also create a |
Or as an environment variable as well for the specific node |
b93edb1
to
e85ce44
Compare
d2ac2f6
to
9b3b7af
Compare
9b3b7af
to
aa81da0
Compare
So, I think that we can merge this. I have added the possibility to |
stdout
as node/operator output
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.
There are some unused import warnings that we should fix, otherwise this looks good to me. Thanks!
This PR makes it possibles for nodes to receive the logs of other nodes.
This makes it possible to see logs within the plotting window for example as shown in the example.
This is aim at potentially simplify debugging when using hot-reloading features or even in a further future auto-debugger.