Application Insights for SWA Preview Deployment

David Cyprian 1 Reputation point
2022-11-18T19:15:14.577+00:00

Hi -- I am using Application Insights for Azure Static Web Apps. It's a very useful debugging tool.

However, a frequent time that I want to debug is on Preview Deployments, AKA non-production environments. These environments are created automatically for me with SWA's integration with GitHub Actions.

I cannot find any tools or documentation to allow me to run Application Insights on my non-production environments. Is this possible?

Any assistance greatly appreciated!

Azure Monitor
Azure Monitor
An Azure service that is used to collect, analyze, and act on telemetry data from Azure and on-premises environments.
2,798 questions
Azure Static Web Apps
Azure Static Web Apps
An Azure service that provides streamlined full-stack web app development.
761 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Ryan Hill 25,661 Reputation points Microsoft Employee
    2022-11-21T06:21:05.217+00:00

    If you used the portal to enable App Insights; then I don't believe auto instrumentation would work, as it's not aware of the preview environments. Plus, your static web app needs an API for that, which I'm assuming you have. However, if you're using a client SDK, then I don't see a reason why that wouldn't work. Comment down below if you find that using a telemetry client doesn't work.