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

[receiver/mongodbatlas] Fix memory leak #32206

Merged
merged 2 commits into from Apr 15, 2024

Conversation

crobert-1
Copy link
Member

Description:

The receiver was leaking goroutines by holding onto idle connections. The solution is to reference the underlying Transport object, and call CloseIdleConnections on it during shutdown.

This change also enables goleak on the MongoDB Atlas receiver to help ensure no goroutines are being leaked.

Link to tracking Issue:
#30428

Testing:
All existing tests are passing, as well as added goleak checks.

@djaglowski djaglowski merged commit d936776 into open-telemetry:main Apr 15, 2024
142 checks passed
@github-actions github-actions bot added this to the next release milestone Apr 15, 2024
rimitchell pushed a commit to rimitchell/opentelemetry-collector-contrib that referenced this pull request May 8, 2024
**Description:** <Describe what has changed.>
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
The receiver was leaking goroutines by holding onto idle connections.
The solution is to reference the underlying `Transport` object, and call
`CloseIdleConnections` on it during shutdown.

This change also enables `goleak` on the MongoDB Atlas receiver to help
ensure no goroutines are being leaked.

**Link to tracking Issue:** <Issue number if applicable>
open-telemetry#30428

**Testing:** <Describe what testing was performed and which tests were
added.>
All existing tests are passing, as well as added `goleak` checks.
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.

None yet

3 participants