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

fix event listeners in net plugin #566

Merged
merged 4 commits into from
May 17, 2019
Merged

fix event listeners in net plugin #566

merged 4 commits into from
May 17, 2019

Conversation

rochdev
Copy link
Member

@rochdev rochdev commented May 15, 2019

This PR fixes the following issues with event listeners in the net plugin:

  • The event listeners would not be cleaned up after the span is finished. When sockets are reused, this would lead to new event listeners constantly added and never removed.
  • The close and timeout events were not handled. This could cause a memory leak if the socket was destroyed or timed out since the span would never be finished.

Since the lookup event cannot be reliably associated with the correct span when connect() is called multiple times, the tcp.remote.address tag was moved to the dns plugin instead as a new dns.address tag.

@rochdev rochdev added bug Something isn't working integrations labels May 15, 2019
@rochdev rochdev added this to the 0.11.2 milestone May 15, 2019
@rochdev rochdev requested a review from rishabh May 15, 2019 19:08
test/plugins/net.spec.js Outdated Show resolved Hide resolved
@rochdev rochdev merged commit ff1b74b into master May 17, 2019
@rochdev rochdev deleted the tcp-events branch May 17, 2019 17:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working integrations
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants