Refactor lib/transaction/tracer/index.js to reduce duplicate logic #2504
Labels
points: 8
risk: high
This change impacts critical areas or has other traits that warrant very careful consideration.
Description
There currently is a lot of duplicated code in lib/transaction/tracer/index.js, specifically around input validation and wrapping of functions. We should abstract some of this duplicate logic into helper methods that allow us to write and test the logic once, and reuse in multiple places
Acceptance Criteria
Reduce duplicated logic for constructing a wrapper function(wrapFunctionNoSegment, wrapFunctionFirstNoSegment, wrapFunctionLast, wrapFunctionFirst, wrapFunction, wrapSyncFunction, and wrapCallback)
https://new-relic.atlassian.net/browse/NR-134520 see this ticket for any additional context
The text was updated successfully, but these errors were encountered: