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(socketio-instrumentation): use apply instead of call method when invoking the 'on' callback #652

Merged

Conversation

dadu109
Copy link
Contributor

@dadu109 dadu109 commented Sep 1, 2023

Description

The call method invokes the callback with args array as the first argument instead of spreading them, and as a side effect changes the data flow. The apply method instead spreads those args into individual arguments for the function.

Socket.io documentation shows that data should be passed as it is received and not wrapped in an array

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How has this been tested?

  • Manual testing

@dadu109 dadu109 requested review from a team as code owners September 1, 2023 11:26
@t2t2
Copy link
Contributor

t2t2 commented Sep 1, 2023

Even though github will auto-sign the squashed commit, there's a bug which prevents us from merging in case any of the to be merged commits aren't signed. Please sign your commit so we can merge this

(Saucelabs tests failing is fine as it requires access to secrets which PRs from forks don't have access to)

@dadu109 dadu109 force-pushed the fix-socketio-instrumentation-listener-wrap branch from 10fa988 to c8e2822 Compare September 1, 2023 15:27
@dadu109 dadu109 force-pushed the fix-socketio-instrumentation-listener-wrap branch from c8e2822 to 33d218c Compare September 1, 2023 15:36
@dadu109 dadu109 force-pushed the fix-socketio-instrumentation-listener-wrap branch from 33d218c to c0bb65a Compare September 1, 2023 16:21
@dadu109
Copy link
Contributor Author

dadu109 commented Sep 1, 2023

Hey @t2t2, got the commit verified 🙌

@t2t2 t2t2 merged commit 64ab1b2 into signalfx:main Sep 1, 2023
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants