sipmifying network instrumentation using std::function