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.
Application Insights for SWA Preview Deployment
David Cyprian
1
Reputation point
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!
1 answer
Sort by: Most helpful
-
Ryan Hill 29,556 Reputation points Microsoft Employee
2022-11-21T06:21:05.217+00:00