jessepollak / jessepollak/mixpanel-python-async

Some events are being dropped

Aperta
#14 4 commenti 2 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Python
Stelle
62
Fork
16
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

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.

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Direzione di ricerca

Start by tracing the mp.track and mp.people_set calls in the reported sequence, comparing the first event with the later calls. Reproduce it under runserver_plus and uWSGI, then verify that subsequent events are sent rather than lost.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
python
Ambito
api, backend
Tipo di issue
Bug
Difficoltà
3/5
Tempo stimato
1-2 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.