[helpers] Rewrite custom instrumentation helper