question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Memory leaks detected

See original GitHub issue

We have implemented the ApplicationInsights package and it works like we expect, however my gulp test-all is coming back with a memory leak:

The following leaks were detected:diagnosticsSource, __zone_symbol__Promise, __zone_symbol__Error, Zone, __zone_symbol__setTimeout, __zone_symbol__clearTimeout, __zone_symbol__setInterval, __zone_symbol__clearInterval, __zone_symbol__setImmediate, __zone_symbol__clearImmediate

Any ideas what could be the problem or how to get around this? Example implementation below:

`const applicationInsights = require(‘applicationinsights’)

applicationInsights.setup(env.APPINSIGHTS_INSTRUMENTATIONKEY) applicationInsights.defaultClient.context.tags[env.APPINSIGHTS_KEY] = env.APPINSIGHTS_ROLENAME applicationInsights.start()

const client = applicationInsights.defaultClient

function appInsightsLogger (message, exception) { if (exception != null) { client.trackException({exception: new Error(message)}) } client.trackEvent({name: ‘My Custom Event’, properties: {customProperty: message}}) } `

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
simpliciti-238commented, Nov 30, 2018

Many thanks, that’s done it for me.

0reactions
markwolffcommented, Feb 20, 2019

@simpliciti-238 Just updating this thread to mention that this issue may have been fixed by https://github.com/Microsoft/ApplicationInsights-node.js/pull/478, so a workaround might not be necessary anymore.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Find memory leaks with the CRT Library - Microsoft Learn
The primary tools for detecting memory leaks are the C/C++ debugger and the C Run-time Library (CRT) debug heap functions. ... The #define ......
Read more >
How to Detect Memory Leaks in Java: Causes, Types, & Tools
How to detect a memory leak in Java · 1. Using Memory Profilers · 2. Verbose Garbage Collection · 3. Using Heap Dumps....
Read more >
How To Detect and Prevent Memory Leaks | Scout APM Blog
Thus, we can say that memory leak occurs in python when the unused data is heaped up and the programmer forgets to delete...
Read more >
Top 20+ Memory Leak Detection Tools for Java and C++
Visual Leak Detector is a free, open-source memory leak detection tool for C/C++. Rapidly diagnoses memory leaks in the C++ application and ...
Read more >
Memory leak - Wikipedia
A memory leak may also happen when an object is stored in memory but cannot be accessed by the running code (i.e. unreachable...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found