-
Notifications
You must be signed in to change notification settings - Fork 142
Description
This was seen from someone another team I work with, and entering to be fixed later and noted in case others run into it. The case ran into was like this:
hotShots.timing(event, milliseconds, {}, tags);
In that case, because an empty object is given for sampleRate, the sendAll() code believes this is a callback. So tags or any other parameters after this are lost. This is odd behavior having to do with the legacy allowing for shortening of parameters in the code in different ways. To fix this and keep the behavior, a smarter check needs to be put in place when checking to see if sampleRate really is the callback by also checking later parameters to see if they are there. And/or send a warning log on this- console.log should be used more in the code for cases where things are clearly off.