aschn / drf-tracking

Utils to track requests to Django Rest Framework API views
http://drf-tracking.readthedocs.org/
ISC License
366 stars 95 forks source link

Some requests are not recorded #139

Open vhin0210 opened 5 years ago

vhin0210 commented 5 years ago

I can't find some requests and I have a feeling it's because of the path field max length is too small?

wbloos commented 5 years ago

I can confirm that this is the case for me. The path can get very long in this particular application. This results in a database error (postgresql):

2019-06-05 10:40:31.930 CEST [3437] user@db ERROR: value too long for type character varying(200) 2019-06-05 10:40:31.930 CEST [3437] user@db STATEMENT: INSERT INTO "rest_framework_tracking_apirequestlog" (...)

And the only field that is 200 long wihich has a value that doesn't fit is "path".

drf-tracking seems to handle this by not inserting the data.

Is there a workaround to this? It should be possible to change the datatype for the "path" field from varchar to text. But i'd rather change it in a model if possible.

gryevns commented 5 years ago

https://github.com/aschn/drf-tracking/pull/140