Skip to content
This repository has been archived by the owner on Nov 27, 2017. It is now read-only.

Automatically calculate and display network latency for a span in the UI #16

Open
codefromthecrypt opened this issue Oct 24, 2016 · 4 comments

Comments

@codefromthecrypt
Copy link

From @mansu on October 18, 2016 20:57

Currently, when we look at a span belonging to a trace in the UI, one has to mentally calculate the network latency to identify what percentage of the latency came from processing and what percentage of latency came from request processing.

So, if a span has cs, cr, ss and sr, the network latency would be (sr - cs) + (ss - cr). Bonus points if the network latency can be shown like the chrome network latency tab. Adding an image from chrome documentation for reference.

image

Copied from original issue: openzipkin/zipkin#1345

@codefromthecrypt
Copy link
Author

fwiw latency is a guess because the distance between "cs" and "sr" is hardly a signal compared to the resource timing api used in chrome https://www.w3.org/TR/resource-timing/#resources-included

that said, using annotations that exist in zipkin, we could color or otherwise the inner most "ws", "wr", failing back to "cs" "sr" when these aren't present. Using "ws" closer to the goal as there's often scheduling or otherwise involved. Plus, you can have an "cs" "sr" served from cache (no network response!), where it would be an error to signal "ws" when there's nothing on the w(ire).

https://github.com/openzipkin/zipkin-api/blob/master/thrift/zipkinCore.thrift

@conorgriffin
Copy link

conorgriffin commented Dec 2, 2016

I did something like this locally, is this kind of what you mean?

The button top-right collapses the latency rows so you don't see them.

zipkin-modal

@codefromthecrypt
Copy link
Author

codefromthecrypt commented Dec 2, 2016 via email

@mansu
Copy link

mansu commented Dec 2, 2016

@conorgriffin Yes, that's exactly what I was suggesting. This is a great start!

What do you think about putting this info as breakdown in "Response time" at the top instead of inline in the span. I think that it would take more advantage of the white space and not take up vertical space, which can be a premium when looking at spans with a lot of tags.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants