-
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
Node process exits very late when sending telemetry #495
Comments
Can you share what Can you also share which version of the As general advice, if you want to make sure telemetry is sent right away, you should use |
Thanks for the response! :) Library version - 1.0.8
|
Thanks! It's possible you're running into problems with the timers used by |
Awesome! I will give that a try. |
Yay! That did it. Thanks for the super quick help Osvaldo. I really appreciate it :). |
Glad to help! |
Whenever I try sending telemetry there is an unusual delay (>60 seconds) before the node process exits. The telemetry does get sent timely so I believe this is an issue with the library.
I am using webpack 4.27.1 and node 10.15.3. Here is the sample code that I used to repro this
import { ApplicationInsightsLogger } from "../../components/TelemetryLogger";
const Telemetry = new ApplicationInsightsLogger("{{InstrumentationKey}}");
const start = new Date().getTime();
console.log("Sending telemetry");
Telemetry.Event("Test");
process.on("exit", () =>
{
console.log("Finished in " + ((new Date().getTime()) - start) + "ms");
});
The time it takes when I send telemetry is more than 60 seconds which should not be the case. I am using the following config for the logger-
ApplicationInsights
.setup(key)
.setAutoCollectConsole(false)
.setAutoCollectDependencies(false)
.setAutoCollectPerformance(false)
.setAutoCollectRequests(false)
.setAutoDependencyCorrelation(false)
.setInternalLogging(false, true)
.setUseDiskRetryCaching(true)
.setAutoCollectExceptions(true)
.start();
Please help point out if I am doing something wrong here. If it's a bug then is there a temporary workaround for this? I really want to use application insights for my project but if this issue remains I will be forced to switch to something else. :(
The text was updated successfully, but these errors were encountered: