Skip to content
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

addworker notification for preventing goroutines leak #894

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

manc88
Copy link

@manc88 manc88 commented Oct 18, 2024

Hi, came across the fact that many of our applications have started to notice goroutine leaks. Found out that
the reason is that we initialize the HTTPSyncTransport object many times in so-called handlers:

github.com/getsentry/sentry-go.(*HTTPTransport).worker(0xc0000000)

goroutine t.worker leaks in our case.
Using blocking HTTPSyncTransport is not beneficial for us and spoils latency.

You can take a look at the solution, thanks to which we managed to reduce the number of running goroutines by orders of magnitude!

Seems like it could be a solution for 731 issue

Thanks for your product anyway.

Mikhail Zvonov and others added 2 commits October 18, 2024 21:17
Copy link

codecov bot commented Oct 28, 2024

Codecov Report

Attention: Patch coverage is 68.75000% with 10 lines in your changes missing coverage. Please review.

Project coverage is 83.02%. Comparing base (6bd150f) to head (56934e2).
Report is 4 commits behind head on master.

Files with missing lines Patch % Lines
transport.go 68.75% 8 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #894      +/-   ##
==========================================
+ Coverage   82.90%   83.02%   +0.12%     
==========================================
  Files          55       55              
  Lines        4627     5468     +841     
==========================================
+ Hits         3836     4540     +704     
- Misses        635      771     +136     
- Partials      156      157       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants