feat: [Step Function] Subscribe forwarder to log group #319
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.
What does this PR do?
Enables adding a subscription filter to subscribe the forwarder to the state machine's log group.
Motivation
This is the second step of instrumenting a step function.
Testing Guidelines
Automated testing
Passed the added test for forwarder setup
Manual testing
Step:
step-functions-typescript-stack
.Result:
@DylanLovesCoffee sorry I borrowed your forwarder.
Additional Notes
It takes a lot of code to extract log group from the log config of a state machine, if the user sets the log group themselves.
There are so many checks because at each level, the variable can often have multiple possible types, e.g.
logGroupConfig
can beTo be able to parse the log group, we assume that nothing is an unresolved token (i.e.
IResolvable
), and throw if anything is an unresolved token. I'm not sure in what case and if it's common that anything is an unresolved token. I think we can start from handling the simple case, and come back later if anyone asks for supporting the unresolved token cases.Types of Changes
Check all that apply