API request tracing with NextJS, Nginx and Django

I’m trying to measure the exact time spent in each stage of my API request flow — starting from the browser, through Nginx, into Django, then the database, and back out through Django and Nginx to the client.

Essentially, I want to capture timestamps and time intervals for:

  • When the browser sends the request

  • When Nginx receives it

  • When Django starts processing it

  • Time spent in the database

  • Django response time

  • Nginx response time

  • When the browser receives the response

Is there any Django package or recommended approach that can help log these timing metrics end-to-end? Currently I have to manually add timestamps in nginx conf file, django middleware, before and after the fetch call in the frontend. There is Datadog but for now I want a django lightweight solution.

Thanks!

django-silk

it is usefull in ur case -lightweight -Native -no heavy setu

let me know u want a setup for that or u can figureout

Вернуться на верх