-
Notifications
You must be signed in to change notification settings - Fork 140
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ApplicationInsights blocks scripts from exiting #390
Comments
Linking some related issues: #54, #220, #310, #331 Are you calling Without |
As an extra note, it's definitely a bug if this SDK keeps you from exiting after all batched items have been sent (when no extra collection features are enabled), rather than a missing mode. This should be covered in this test, but perhaps it's missing something: https://github.com/Microsoft/ApplicationInsights-node.js/blob/develop/Tests/js/endToEnd.js |
Yes I was using Changing my configuration to this, solves my issue: const appInsights = require('applicationinsights');
appInsights.setup("...")
.setAutoCollectExceptions(true)
.setAutoCollectConsole(true)
appInssights.defaultClient.config.maxBatchIntervalMs = 100; Thanks! |
I'm using application insights to instrument a gulp build script, and it blocks gulp from exiting when started.
I manually need to run
client.dispose()
after each entry task's exit point (on finish, on error) and the error handlers of all the dependencies.I'm guessing the architecture has a log collector agent that is running in the background. It would be good to have a synchronous mode where that's not created, and flush the events on process exit.
The text was updated successfully, but these errors were encountered: