Logging and Instrumentation

Application insights is used to monitor both the node(express) instance and the NextJS client code running on the browser.

AppInsights is configured with the instrumentationKey (or process.env.APPINSIGHTS_INSTRUMENTATIONKEY) provided from the environment variables.

AppInsights collects the console logs provided by the Winston. AppInsights on Client side is implemented using a React HOC(Higher order component) to the Next's _app.ts.