Open
Conversation
mjohnson12
approved these changes
Oct 16, 2023
Collaborator
mjohnson12
left a comment
There was a problem hiding this comment.
I like the approach and the items chosen to log.
| import Foundation | ||
|
|
||
| /// Namespace for logging API used to propagate internal Workflow-related logging to external consumers | ||
| public enum ExternalLogging {} |
Collaborator
There was a problem hiding this comment.
Love the use of the name space.
attoh-square
left a comment
There was a problem hiding this comment.
I think for what we are trying to achieve here, the simplicity of this approach make it a good fit. Its nice that we don't have to add another dependency and this looks simpler to maintain where the existing telemetry infra may not be (it's makes sense to separate telemetry from general logging anyways).
Clients are expected to configure this early on when bootstrapping.
Does this mean that nested workflows need to configure logging as well or configuring at the root workflow should be enough?
5ea7756 to
7bf5a6c
Compare
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Issue
we've had a few cases come up recently where it'd be nice to have a way to add log statements to portions of the workflow runtime which can then be 'externally recorded'. the main motivation in my mind is to add some diagnostic logs into 'exceptional' cases that we'd prefer not to happen. if we can collect these from client applications, we'll then be able to ensure that, say, changing a warning log/assertion to a fatal error won't cause huge problems 'in the wild'.
here's a pros/cons list of some of the possible implementation approaches considered for this task:
Description
for this PR, i've gone with option
1and named/structured things somewhat similarly to how they look & work in SwiftLog. looking for feedback on the general approach, and thoughts on the design problem.Checklist