[BUG] Using @microsoft/applicationinsights-web on Nextjs' client-side hangs
See original GitHub issueDescription/Screenshot
Using Application Insights to track exceptions that happen on the client-side of a Nextjs application hangs when trying to build (npm run build
) the web app.
Here’s a quick video that describes better what’s happening:
Steps to Reproduce
- OS/Browser: macOS 11.6
- SDK Version [e.g. 22]: @microsoft/applicationinsights-web: ^2.7.0
- How you initialized the SDK:
import { ApplicationInsights } from '@microsoft/applicationinsights-web';
const appInsights = new ApplicationInsights({
config: {
instrumentationKey: process.env.NEXT_PUBLIC_APPINSIGHTS_INSTRUMENTATIONKEY,
autoTrackPageVisitTime: true,
},
});
appInsights.loadAppInsights();
export default appInsights;
Expected behavior Nextjs web app should build without a problem while using application insights.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:9 (4 by maintainers)
Top Results From Across the Web
Next.js dev server gets stuck after a while, requests just spin
Bug report Describe the bug When I run my Next.js app with now dev, after a ... It will work for a while,...
Read more >Azure Application Insights for JavaScript web apps
Get page view and session counts, web client data, and single-page applications and track usage patterns. Detect exceptions and performance ...
Read more >Application Insight works fine localhost but in Azure only client ...
Ok, i'm officially an idiot. I had a Web.Config transformation that was supposed to only replace an attribute in the part of Webconfig...
Read more >Troubleshooting Cloud Functions - Google Cloud
In order to deploy a function, a user who has been assigned the Project Viewer, the Cloud Function Developer, or Cloud Function Admin...
Read more >You're using HttpClient wrong and it is destabilizing your ...
I know I did. The typical usage pattern looked a little bit like this: using(var client = ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yes, loadAppInsights() is effectively the client side initialization. Without calling this the SDK (on the client side) is not running / listening / initialized.
@xiao-lix @kryalama, Do you remember or have a link to the original issue and can you try and repro when you get a chance to see if this is something we can and need to fix.