-
-
Notifications
You must be signed in to change notification settings - Fork 587
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
Tracing flattenTags memory leak with api stream #777
Comments
Config: tracing: {
enabled: true,
events: true,
stackTrace: true,
exporter: [
//"Console",
{
type: "Jaeger",
options: {
endpoint: process.env.JAEGER,
sampler: {
type: "Const",
options: {}
},
tracerOptions: {},
defaultTags: registry => ({
namespace: registry.broker.namespace,
nodeID: registry.broker.nodeID,
version: registry.broker.MOLECULER_VERSION
})
}
}
]
}, |
Temporary fix for action with stream:tracing: {
tags(ctx, response) {
return {
params: ctx.params.$params,
meta: ctx.meta,
response
};
}
}, |
Hey @icebob any luck on what actually might be causing the issue? I'm out of options here and relying on just the logs for debugging. I wasn't having this issue with Newrelic but when I migrated to Datadog, I've started facing this issue. |
@abhisheksinha1601 are you also using streams? |
@icebob not stream, just the datadog tracing exporter (ddtrace-js-v0.21.1). Can this be because of the |
I don't know, but the issue opener has a problem with streams. The flattenTags make a deep copy of the params. So if you have big or circular object in the |
I've encountered the same issue using
So i've just extended Jaeger tracer, and replaced socket object with socket.id. I had to prospect sources for a bit, so i believe this could be helpful for anyone who have similar issues. moleculer.config.js
Hope this can save few hours for someone :) |
Prerequisites
Please answer the following questions for yourself before submitting an issue.
Current Behavior
Use moleculer-web with stream and tracing exporters.
Expected Behavior
Check types
obj
and ignore binary stream.Failure Information
Memory leak in source: https://github.com/moleculerjs/moleculer/blob/master/src/tracing/exporters/base.js#L88
Steps to Reproduce
Please provide detailed steps for reproducing the issue.
Context
Please provide any relevant information about your setup. This is important in case the issue is not reproducible except for under certain conditions.
Failure Logs
The text was updated successfully, but these errors were encountered: