Hello all,
I have an issue with sending events to AWS bucket via the python-tracker.
After some debugging, I still have no idea what could be the issue.
Here is my console log when I call
tracker.track_page_view(“http://127.0.0.1:8000/post-5/ ”)
GET request finished with status code: 404
[{‘e’: ‘pv’, ‘url’: ‘http://127.0.0.1:8000/post-5/ ’, ‘eid’: ‘79849857-5bf3-49e2-91f0-de5251885088’, ‘dtm’: 1588870245736, ‘tv’: ‘py-0.8.3’, ‘p’: ‘pc’, ‘stm’: ‘1588870245000’}] events NOT sent!
Any help will be welcome.
Thanks.
Hi @mikaelsondi
Please you send over the complete code snippet, including how you have initialised the tracker and emitter?
You can also take a look at our setup docs here and initialization docs here .
Hi @PaulBoocock ,
Thanks for the reply.
Here is my code snippet:
from snowplow_tracker import Tracker, Emitter, Subject, logger
def f(x):
print(str(x) + " events sent successfully!")
def g(x, y):
print(str(y) + " events NOT sent!")
def post_detail(request, slug):
emitter = Emitter(“d2rf2d7gk454d7.cloudfront.net ”, buffer_size=1, on_success=f, on_failure=g)
tracker = Tracker(emitter)
subject = Subject()
subject.set_platform(“pc”)
tracker.set_subject(subject)
tracker.track_page_view(“http://127.0.0.1:8000/post-5/ ”)
Thanks
@PaulBoocock
Could the issue be a bad configuration of my AWS S3 bucket?
ihor
May 7, 2020, 10:27pm
5
@mikaelsondi , you are using deprecated Cloudfront collector. Have you restricted access to it as it is not publicly available?
Here’s the guide on how to set it up: https://github.com/snowplow/snowplow/wiki/Setting-up-the-Cloudfront-collector .
For event to appear in the S3 bucket you also need to set up batch pipeline. Have you done that as well? Are you referring to S3 bucket to which logs from CloudFront are rotated to? In the latter case, again, refer to the link above.