Currently, many of our instrumentation libraries will apply wrapping multiple times if invoked repeatedly. This can lead to duplicated behavior and unintended side effects. Instrumentation should be idempotent—wrapping should only be applied once, regardless of how many times wrap is called.
Tasks:
- Audit existing manual instrumentation to identify where multiple wrapping can occur
- Add safeguards to ensure instrumentation bails out if it has already been applied
- Add unit tests for each wrapper to verify that instrumentation is only applied once
Currently, many of our instrumentation libraries will apply wrapping multiple times if invoked repeatedly. This can lead to duplicated behavior and unintended side effects. Instrumentation should be idempotent—wrapping should only be applied once, regardless of how many times wrap is called.
Tasks: