@Bruce Qin Thanks for reaching out.
Azure Functions does not support ptrace system calls. However, Azure Functions does offer integration with Azure Monitor Logs to monitor function executions. You can configure Azure Functions to send system-generated and user-generated logs to Azure Monitor Logs.
Azure function does support custom handler in case if you want to implement a function app in a language that's not currently offered out-of-the box or implement a function app in a runtime that's not currently featured by default. I am not an expert in AWS lambda function, so I am not sure if this is the functionality that you are looking for when you mentioned wrapper script/extension in AWS lambda.
In case if you have any feature request or product feedback for Azure function you can always pass it here where product team monitors the customer feedback.
Please 'Accept Answer' if it helped so that it can help others in the community looking for help on similar topics.