Time tracing in nginx

Hi
I get some incoming requests that take longer to complete than others
for no particular reason that I can see (goes from 0.03s to above 1s for
the exact same file from the exact same host)
Is there any way to add debug/tracing log so I can see which part of my
config this time gets lost on?
The server does over 100 requests/sec and I’m finding it very difficult
to trace which part is taking long to complete sometimes.

Many thanks