[test] Fix sampling test to not produce bucket warnings against SRv2
[helpers] Add helper function to make custom instrumentation easier