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

Library drops events that are emitted close in time to one another #1

Closed
meltzerj opened this issue Dec 16, 2013 · 5 comments
Closed

Library drops events that are emitted close in time to one another #1

meltzerj opened this issue Dec 16, 2013 · 5 comments

Comments

@meltzerj
Copy link

@meltzerj meltzerj commented Dec 16, 2013

Because the push function has a setTimeout, if a bunch of messages are queued, the data variable will get overridden.

Even if you wrap the setTimeout inside of a self invoking function and locally scope the data variable, I'm still getting some messages dropped. Could this be that we need to wait for the image's request to receive a response before sending the next message?

@meltzerj meltzerj closed this Dec 16, 2013
@meltzerj
Copy link
Author

@meltzerj meltzerj commented Dec 16, 2013

Just realized that what I said doesn't make sense, since the push function scopes data already.

@hyunlim
Copy link
Contributor

@hyunlim hyunlim commented Dec 16, 2013

@meltzerj Were the events dropped on Friday or Saturday? We had a fire on those days, and events from those days are being recovered and indexed right now.

@meltzerj
Copy link
Author

@meltzerj meltzerj commented Dec 16, 2013

It was last night, so Sunday night. I noticed if I take out the setTimeout in the push function, I didn't lose the events. It might be a problem with Chrome, since I was setting a breakpoint inside of the setTimeout and it wasn't firing all setTimeouts, but that's probably unlikely...

@hyunlim
Copy link
Contributor

@hyunlim hyunlim commented Dec 16, 2013

Ah, I see. The default implementation is with setTimeout, so the tracking will not block your program function stack. If you do navigate away from the page before your program's function stack is complete, the queued setTimeout's will never be reached. For example, if this was bound on a click event where window.location was switched. The function would never execute then.

Perhaps the blocking/nonblocking should be a configurable option. I'll keep this in mind for the next iteration. For now, if it's ok for the tracker to be a blocking call, do take out the setTimeout as you already did.

@meltzerj
Copy link
Author

@meltzerj meltzerj commented Dec 16, 2013

That would make sense. Although I think some set timeouts were not firing, even when I wasn't navigating away from pages. But I'm really not sure how that's even possible... maybe I was just seeing things.

vhalbwachs pushed a commit that referenced this issue Feb 4, 2015
Shwetajain148 pushed a commit to Shwetajain148/loggly-jslogger that referenced this issue Oct 23, 2017
update api url for latest chopper build
Shwetajain148 pushed a commit to Shwetajain148/loggly-jslogger that referenced this issue Oct 23, 2017
also try telnet to check if host is up
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.