Network time

How network time works. First, we need to understand the concept of spans. Spans are a core concept to tracing and we'll find them in our tracing, opentracing, and other tracings. A Trace is comprised of one or more calls.  Each call is comprised of one or more spans. The root call in a trace has an Entry Span - this defines the entry to the call from an uninstrumented service/process. The outbound call out of a trace has an Exit Span - the exit of the call to an uninstrumented service/process. The intermediate calls have both an Exit Span (the exit from the caller) and an Entry Span (the entry into the call itself aka the callee) since both the caller and callee are instrumented.  When you click on any call in the trace, you will see Callee Details, Caller Details, or both depending on the above. To summarize, a Call can either have an Entry Span, an Exit Span or an Exit+Entry Span.

For intermediate calls where we have both the Exit Span+Entry Span, we can calculate so-called Network Time. The Network Time is the Exit Span time minus the Entry Span time. Basically, the Caller - Service A - executed a call to another service - service B - and it took X seconds. The Callee - Service B - was then invoked and executed the call and it took Y seconds. The Network Time would be X-Y seconds. Let's say X is 5 and Y is 2. That means the Network Time is 3 seconds. Service A does not necessarily wait for Service B to complete as it could be asynchronous.

What Instana calls 'Network Time' is not necessarily network time - it is any time that was consumed between the two calls (both during the request and response). It could very well be network time, but it could be container network or serialization, e.g. overloaded network, following redirects, queueing, overloaded JVM.

Here's the summary of how the times are defined:

  • Total Time: the total (clock) time of a call

  • Wait Time:  the amount of time the call spends waiting on all downstream calls to complete = Sum of all downstream calls total times

  • Self Time: the amount of time the call spends outside of downstream calls

  • Network Time: The difference between the caller’s Exit Span Time and the call’s Entry Span Time

Have more questions? Submit a request

Comments