We have Azure Function app (v.4) with post api calls to some external rest resource. I can see occasional failures in Azure monitoring (Azure Insights), but everything I was able to collect in Logs is external api endpoint url (Path like https://...
when you open dependencies) with the request get parameters. In order to troubelshoot the failure I need to collect Form data as well for post requests. I wonder how easy it would be, like as easy as setting some flag in azure configuration or modifying app and writing tracing logs explicitly.
CodePudding user response:
The App Insights -> Transaction Search in the portal will show the requests and trace messages but it will only indicate that the function made a HTTP POST call, the response code and duration of that call, it will not show the payload details, so the function app explicitly need to log those details as TRACE
info using ILogger
instance that is injected to the function.