Skip to main content

Add request duration to django-structlog request log.

Project description

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",
]

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django_structlog_duration-0.0.1.tar.gz (2.8 kB view hashes)

Uploaded Source

Built Distribution

django_structlog_duration-0.0.1-py3-none-any.whl (3.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page