jessepollak / jessepollak/mixpanel-python-async

Some events are being dropped

Đang mở
#14 4 bình luận 2 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Python
Star
62
Fork
16
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

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.

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Hướng nghiên cứu

Bắt đầu bằng cách theo dõi các lệnh gọi mp.track và mp.people_set trong chuỗi được báo cáo, so sánh sự kiện đầu tiên với các lệnh gọi sau đó. Tái hiện sự việc trên runserver_plus và uWSGI, sau đó xác minh rằng các sự kiện tiếp theo được gửi đi thay vì bị mất.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
python
Lĩnh vực
api, backend
Loại issue
Lỗi
Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
35/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.