We recently had a memory leak in our application that was causing heap out of memory errors and causing processes to crash. After some investigation it seems like there might be a memory leak from caused by this library. Once we removed the trace-agent lib the memory profile returned to normal. The offending src seems to be the endSpan function in ./node_modules/@google-cloud/trace-agent/build/src/span-data.js. I noticed a couple related issues, but that there was no clear resolution yet: #632, #603
Here is a screenshot of our heap profile:

We are running a very simple express app with just a couple routes. The memory would very slowly build up overtime, over several days. If you need any other info please let me know. Hopefully we can track it down.
Versions:
@google-cloud/trace-agent: 3.0.0,
express: 4.16.3,
gke: 1.10.5-gke.3,
node: 8.11.3 alpine
We recently had a memory leak in our application that was causing heap out of memory errors and causing processes to crash. After some investigation it seems like there might be a memory leak from caused by this library. Once we removed the trace-agent lib the memory profile returned to normal. The offending src seems to be the
endSpanfunction in./node_modules/@google-cloud/trace-agent/build/src/span-data.js. I noticed a couple related issues, but that there was no clear resolution yet: #632, #603Here is a screenshot of our heap profile:
We are running a very simple express app with just a couple routes. The memory would very slowly build up overtime, over several days. If you need any other info please let me know. Hopefully we can track it down.
Versions:
@google-cloud/trace-agent: 3.0.0,
express: 4.16.3,
gke: 1.10.5-gke.3,
node: 8.11.3 alpine