azureangular7azure-web-app-servicewhitelistimperva

Azure WebApp - How to add custom tracing in App Insights


Technical Stack

We are planning to deploy Angular 7 build in Azure WebApp and will add custom domain to it which will be behind Imperva WAF. WAF will make sure that only whitelisted IPs can access site. WebApp gets WAF IPs instead of client IPs.

In this case, we are not able to trace usage reports for given client IPs. So as per suggestion, we want to add these data into App Insights to make sure we have all to get the usage reports.

How to implement this? Do we have anything to write custom code to implement this?


Solution

  • Please correct me if I misunderstand you.

    There is application insights sdk, you can take use of it like use methods trackTrace / trackEvent to add your custom log.

    You can also search by google, there're lots of examples of using application insights for logging with code.

    Hope it helps.