script generation: add logging
script generation: add metrics
Merge branch 'hh-build-api' into staging