Thanks for posting this question in Q&A forum.
As you mentioned, "AzureFunctionsWebHost__hostId" app setting can be added and a unique guid value can be provided to identify the function instance. Another way is to create and concatenate the guid value with the invocation id through code. Here is an example: https://stackoverflow.com/questions/64114545/how-to-get-unique-instance-id-of-azure-function-in-python
Hope this helps! Feel free to reach out to me if you have any queries or concerns.