Base instrumentation functionality, see #3