Add function instrumentation infrastructure