[helpers] Add helper for sync custom instrumentation and add tests for both modes