Some events are being dropped
skorokithakis opened this issue · 4 comments
I am using the lib for a project of mine, and I noticed some events are being dropped. I added printing calls to the official Mixpanel lib (that MPA uses) and used the following code:
mp.track(str(request.user.pk), "changed settings")
mp.people_set(str(user.pk), {
"$email": user.email,
"$name": user.name,
"$ip": request.META.get('HTTP_X_FORWARDED_FOR', request.META.get('REMOTE_ADDR')).split(',')[-1].strip(),
"username": user.username,
})
mp.track(str(request.user.pk), "changed settings 2")
What came out was:
web_1 | {'data': b'[{"properties":{"distinct_id":"21","token":"decoded this from base64 to redact the token","time":1508248513,"$lib_version":"4.3.2","mp_lib":"python"},"event":"changed settings"}]'
, 'verbose': 1, 'ip': 0}
web_1 | 172.26.0.5 - - [17/Oct/2017 13:55:13] "POST /settings/ HTTP/1.1" 302 -
And that's it. Even after minutes, nothing else is sent. I'm using runserver_plus to run this, but it also happens on production with uWSGI. You will notice that only the first event got sent, and all subsequent events are lost.
I too am facing this. Were you able to resolve this @skorokithakis ?
Hmm, no, I think in the end I just switched to the sync library.
Guess, I have to do the same. :(
I've just noticed that I cannot see the events when I set api_host="api-eu.mixpanel.com". I don't understand why.