Our current FunctionProfilingLayer implementation got quite complex, and has some problems: mainly that it requires a String allocation for the namespace (added in #5311), and that implementing functionality via on_enter/on_exit causes it to measure processing time instead of latency.
We should check if it's not easier to use a function wrapper (like record_async_duration), or if these issues can be fixed, and in either case, unify profiling metrics of RPC and block processing.
Our current
FunctionProfilingLayerimplementation got quite complex, and has some problems: mainly that it requires aStringallocation for the namespace (added in #5311), and that implementing functionality viaon_enter/on_exitcauses it to measure processing time instead of latency.We should check if it's not easier to use a function wrapper (like
record_async_duration), or if these issues can be fixed, and in either case, unify profiling metrics of RPC and block processing.