Skip to content

Proof of concept! Add request duration to django-structlog request log.

License

Notifications You must be signed in to change notification settings

tm-kn/django-structlog-duration

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

django-structlog-duration

If you use django-structlog, this is a little extension that will populate the request_finished log with the duration of the request (request_duration).

Installation

Install the package.

pip install django-structlog-duration

Configure the middleware.

MIDDLEWARE = [
    "django_structlog_duration.StartTimer",
    # ...
    "django_structlog.middlewares.RequestMiddleware",
    "django_structlog_duration.StopTimer",
]

About

Proof of concept! Add request duration to django-structlog request log.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages