-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Memory leak issue with Open Telemetry and jaeger exporter #1490
Comments
Thanks for the bug report. Have you been able to see the error while running with a profiler? Also, when you defer the end of the span, does that function ever return? |
Hey @MrAlias It seems that problem was calling GetTracer every time we were creating a new Span(Bug). But I was wondering, shouldn't GetTracer be a Singleton?? |
Thanks for looking into this. The Tracer returned from |
I have lost the pprof that shows something like that, but i can share problematic code that was creating this problem.
and it was getting called every time someone created a new span. When i profiled, i remember seeing multiple tracer. |
We are experiencing the exact same problem. We continuously profile our entire infrastructure, so we have profiling data available for everything. Let us know what would be useful to you! :) Process start: https://share.polarsignals.com/7aef522/ This data also highly suggests something within the global tracer to be leaking, but it's very possible that we're doing something wrong. Let me know what I can try or provide further that would be helpful! |
@brancz Thanks for chiming in. |
It's entirely possible I'm missing context, and apologies in advance if so! But looking at the profiles @brancz shared it gets me wondering when things added to p.tracers here would be removed: opentelemetry-go/internal/global/trace.go Lines 90 to 91 in e499ca8
If, for example, the grpc UnaryClientInterceptor is calling Tracer like so for every request: When would its associated tracer in p.tracers be removed? |
Signed-off-by: Bogdan Drutu <[email protected]>
Signed-off-by: Bogdan Drutu <[email protected]>
Signed-off-by: Bogdan Drutu <[email protected]>
Signed-off-by: Bogdan Drutu <[email protected]>
Signed-off-by: Bogdan Drutu <[email protected]>
Signed-off-by: Bogdan Drutu <[email protected]>
Signed-off-by: Bogdan Drutu <[email protected]>
Signed-off-by: Bogdan Drutu <[email protected]>
Hi @bogdandrutu |
@michelaquino we are hoping to make a release by the end of the week that will contain this fix. Please reach out to us in the CNCF otel-go slack channel if you have any more questions about the release. |
We are using Open Telemetry in a reverse Proxy at scale and seeing memory leak.
This is how I am initiating tracer.
This is how it is used to create a global tracer.
That's how we are creating a span and then few more child spans are created. But we are seeing this
It goes up as we add more spans and off course that impacts GC and CPU usage on node. Can someone please have a look and let me know if i am doing something wrong in code or it's related to lib??
The text was updated successfully, but these errors were encountered: