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

Some events are being dropped #14

Open
skorokithakis opened this issue Oct 17, 2017 · 4 comments
Open

Some events are being dropped #14

skorokithakis opened this issue Oct 17, 2017 · 4 comments

Comments

@skorokithakis
Copy link
Contributor

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.

@prafulbagai
Copy link

I too am facing this. Were you able to resolve this @skorokithakis ?

@skorokithakis
Copy link
Contributor Author

Hmm, no, I think in the end I just switched to the sync library.

@prafulbagai
Copy link

Guess, I have to do the same. :(

@martin-thoma
Copy link

I've just noticed that I cannot see the events when I set api_host="api-eu.mixpanel.com". I don't understand why.

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

No branches or pull requests

3 participants