i'm wanting implement fluentd log user actions nginx logs.
we have 1 site runs express (server side react)
- users login
- view content
- like content
- comment on content
content can article, video, photo, etc...
we're using nginx handle traffic & ssl. users authenticated jwt tokens, jwt tokens hold userid, email, , name.
i thinking of logging everything through deconstructing requests using regexes , built in fluentd methods. thing i'll have decompile jwt , grab userid.
but i'm thinking may better send http requests nginx host fluentd picks them corresponding tag(fluentd listening on ports).
a request may this:
{"activity": "liked", "contentid": "2", "contentslug": "/some-path/slug-here", "userid": "44"} post http://hostname.com/fluentd.tagname.here (this tag user.activity)
these requests added sort of queue, every x minutes, bulk update made.
note multiple requests created per site view. along user activity, log content recorded include id, time, etc...
is i've explained way of doing logging user activities? should send http requests web servers information such activity user has performed?
Comments
Post a Comment