Welcome! Log In Create A New Profile

Advanced

Re: Any way to get timestamps for upstream-downstream events?

Maxim Dounin
June 10, 2019 09:42AM
Hello!

On Fri, Jun 07, 2019 at 12:54:22PM -0700, Ryan Burn wrote:

> Hello everyone,
>
> I work on a module that provides distributed tracing for NGINX
> (https://github.com/opentracing-contrib/nginx-opentracing). If
> possible, I would like to include in the tracing data timestamps for
> the following events:
>
> * When the last byte from a downstream request was read

This information isn't generally available. If you need it, you
can record this in your own module.

> * When the first byte of an upstream request was sent

This is more or less the same as the time connect was finished.
For each peer tried during request processing related information
can be found in the $upstream_connect_time variable.

Note that, much like other upstream-related variables, these
timings are a) per upstream connection attempt, so there can be
many for a given request, and b) not absolute, and instead specify
duration of appropriate operations.

> * When the last byte of an upstream request was sent

This information isn't generally available.

> * When the first byte of an upstream response was read

Closest information available is $upstream_header_time.

> * When the last byte of an upstream response was read

Check $upstream_response_time.

> * When the first byte of a downstream response was sent

This information is not generally available.

> * When the last byte of a downstream response was sent

Check $response_time. Alternatively, you can record this
information in your own module.

--
Maxim Dounin
http://mdounin.ru/
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

Any way to get timestamps for upstream-downstream events?

rnburn 507 June 07, 2019 03:56PM

Re: Any way to get timestamps for upstream-downstream events?

Maxim Dounin 212 June 10, 2019 09:42AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 305
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready