Azure Application Insight integration

◷ Reading Time: 2 minutes

This service is to enable FlexRule function app logging on Azure cloud.

We learned how to deploy a service as Azure Function. In order to enable creating request/response logs for an existing FlexRule function app, follow the below steps on the Azure portal.

  1. Click on the deployed function app and choose Configuration. You should see the setting named “CaptureRequestResponsePair” with the value “false”. If not, download the latest version of FlexRule CLI and deploy your model on Azure again.

2. Click on “Application Insight” then choose “Turn on Application insights”.

3. You can use either an existing resource to store logs or create a new one.

4. Run CLI command to update the environment setting “CaptureRequestResponsePair” value to “true” by adding these parameters.

--environmentFrom "json" --environmentValue "{'CaptureRequestResponsePair': true}"

5. Confirm “CaptureRequestResponsePair” value is true now.

6. Execute the service by sending a request to the deployed function app URL using Postman and confirm the response.

AZURE service

7. Click on the created application insights then choose “Transaction search” -> “See all data in the last 24 hours”.

8. You can sort it by time (newest first) and Lookup for the “REQUEST” log. and if you open it, you can see ResponseBody and RequestBody.

Updated on June 23, 2023

Was this article helpful?

Related Articles