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 details)

Uploaded Source

Built Distribution

File details

Details for the file django_structlog_duration-0.0.1.tar.gz.

File metadata

  • Download URL: django_structlog_duration-0.0.1.tar.gz
  • Upload date:
  • Size: 2.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.3.2 CPython/3.11.1 Linux/6.1.8-200.fc37.x86_64

File hashes

Hashes for django_structlog_duration-0.0.1.tar.gz
Algorithm Hash digest
SHA256 a647d8867ef1ec67dc23a0a7668c0086a4ed8300d91c7134b6a45a7fb45ee1b3
MD5 8202bcf5153e726061e65407bd5c7643
BLAKE2b-256 12282a319b94229cc3d8cadf3baa44b0a3af54183b92d313b998ed81fe962bcb

See more details on using hashes here.

File details

Details for the file django_structlog_duration-0.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for django_structlog_duration-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 156b2706c15ab5eb4d3b98a93b351e7ebc820c3e0efd29903ba32c9d219cbde6
MD5 9ee6079f39433632cd0cd687a0e9027e
BLAKE2b-256 f97860075f68aba91053c4239c60443db551f1fdd8ffbdfa1c97c5d3aa52aee8

See more details on using hashes here.

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