lingster / drf-api-tracking

Fork of aschn/drf-tracking so that we can maintain and release newer versions
ISC License
274 stars 57 forks source link

Log custom headers #24

Open lerela opened 4 years ago

lerela commented 4 years ago

Some requests might include additional, useful information about the client in some custom HTTP header, say X-Client-Name and X-Client-Version. There is no way to currently get that information.

I see two main approaches, both based on a JSON field to store headers (that would restrict this feature to the DB backends that support JSON fields, but it's already been suggested to use them in #2):

lingster commented 4 years ago

I think having an option in settings to determine a list of headers to store.

Also I think storing this data is a json field is the most flexible. Django 3.1 now supports JSONfields for all db backends: https://docs.djangoproject.com/en/3.1/releases/3.1/#jsonfield-for-all-supported-database-backends

cyberbudy commented 4 years ago

+1

honeydev commented 3 years ago

It's realy important feature.