It calls shouldUpdateStepForStepFunctionContextInjection().
This PR
merges the two functions by moving the code of shouldUpdateStepForStepFunctionContextInjection() into injectContextForStepFunctions().
makes the tests for shouldUpdateStepForStepFunctionContextInjection() test injectContextForStepFunctions() instead
Why?
We will soon have different instrumentation strategies depending on the existing state of Lambda definition, so shouldUpdateStepForStepFunctionContextInjection() which has a boolean return value will no longer work.
What
Currently the
injectContextForStepFunctions()
function roughly looks like this:It calls
shouldUpdateStepForStepFunctionContextInjection()
.This PR
shouldUpdateStepForStepFunctionContextInjection()
intoinjectContextForStepFunctions()
.shouldUpdateStepForStepFunctionContextInjection()
testinjectContextForStepFunctions()
insteadWhy?
We will soon have different instrumentation strategies depending on the existing state of Lambda definition, so
shouldUpdateStepForStepFunctionContextInjection()
which has a boolean return value will no longer work.Design doc: Fixing Step Function Instrumentation
Testing
Passed the touched automated tests
Review checklist