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 Logging for Workflow #7065
Comments
👍
|
Tiny nit: consider being consistent in use of quotes around names/IDs. |
Have we considered whether some of this information could be added to the log schema? For example, instead of making the workflow ID part of the log message, could it just be a first-class property on the log record itself (i.e., structured logging)? |
Can I make a super minor suggestion that you tweak the message format for 4 and 5 (and the registration messages) so that they follow the same pattern as 1, 2 3. i.e.
This format helps when doing searches across logs as I can easily search for the phrase |
For logging the Completion of a Workflow details, if the status is Fail, consider adding the source of the error(DTF/ Workflow Client/ DAPR Client) in the message. Also the errors should not log confidential details like Apps hostname/ IP Address/ subscription ID ..etc. |
Something that came up in interviews with DF customers is that being able to see the input and output of activity functions would be helpful. Not sure if this is something to be exposed on the logging side, but exposing this info would be useful for debugging. |
This two comments: are really valid points and have not been addressed on the PR #7222 . Taking the most out of structured logging is crucial IMO to make the workflow logging useful for debugging, once structured logging is put in place it can more easily enable log processing and allows for more easily querying for the inputs and outputs of activities I can create a PR if you are happy with it |
@famarting I'm supportive of this, and would be happy to provide feedback and/or guidance. |
@famarting @cgillum As per comment #7065 (comment), I was adding For querying activity inputs/outputs, do we want to add these as well in logs? Won't these be user information and can potentially be quite large in size? For the other comment, yeah it makes sense to add |
In what area(s)?
/area runtime
Describe the feature
Currently, it is rather difficult to diagnose an issue that occurs when a user is using dapr workflow, and due to dapr workflow being a new feature, issues occur more frequently than hoped. By adding in additional logging, diagnosing the issue will be a much easier process. I am proposing the following logs to be added to the runtime:
c.logger.Infof("Created workflow %s with instanceID '%s'", <workflowName>, <instanceID>)
c.logger.Infof("Scheduling activity '%s' for workflow %s with instanceID %s", <activityName>, <workflowName>, <instanceID>)
c.logger.Infof("Executing activity '%s' for workflow %s with instanceID %s", <activityName>, <workflowName>, <instanceID>)
c.logger.Infof("Activity '%s' completed with status: '%s' for workflow %s with instanceID %s", <activityName>, <activityStatus>, <workflowName>, <instanceID>)
c.logger.Infof("Workflow %s with instanceID %s completed with status: '%s'", <workflowName>, <instanceID>, <workflowStatus>)
In addition to the proposed logs for the runtime, I am also proposing that we add logs to the various SDKs which will provide information that the runtime does not have access to. These logs are as follows:
log("Workflow <workflowName> has been successfully registered")
log("Activity <activityName> has been successfully registered to workflow <workflowName>")
Additional Thoughts
Release Note
RELEASE NOTE:
The text was updated successfully, but these errors were encountered: