https://pantsbuild.org/ logo
#general
Title
# general
d

dry-policeman-7927

05/30/2019, 2:26 PM
Hello good people! I am back and continue to work on Zipkin tracing in Pants. Zipkin tracing didn’t work properly with multiple threads and I am in the process of changing it. Thus I have a question: Background workunits in Pants do not have a parent workunit. So currently in Pants at least two workunits do not have a parent. But in Zipkin the span without a parent id is considered the root of the trace. So Zipkin trace that has two spans without parent in Zipkin UI looks very bad. Is it fine for
background_root_workunit
to be a child of the main workunit? Pictures show how the trace will look like in this case. If this solution is not very good I would be grateful for better one 🙂
a

aloof-angle-91616

05/30/2019, 2:28 PM
i think this would work swimmingly! it even looks similar enough to how
./pants server
renders them!
r

red-balloon-89377

05/30/2019, 2:44 PM
So the main thing that would be good to have is to have
background
at the end, then it would be almost like
./pants server
, but I realize that that’s probably not worth the effort at the moment 🙂 I also think this looks good.
👍 1
a

aloof-angle-91616

05/30/2019, 3:01 PM
is it possible to modify the vertical ordering that parallel traces are displayed in the zipkin ui without modifying the actual trace? that would seem like a good feature unless i’m missing something. agreed that that’s not necessary at the moment
w

witty-crayon-22786

05/30/2019, 4:19 PM
@dry-policeman-7927: i think that that should be fine, but you should see what it looks like with
./pants server --open
and maybe confirm with @gentle-wolf-58752
👀 1
d

dry-policeman-7927

05/30/2019, 4:27 PM
@witty-crayon-22786 in
./pants server --open
workunits
main
and
background
do not have parents and are represented one after other. Zipkin UI treats span without parent as a root span. And for now I do not know how to change vertical representation of the spans in Zipkin UI 😞
w

witty-crayon-22786

05/30/2019, 4:36 PM
understood
@dry-policeman-7927: i'm saying that it is 100% fine to change the workunits, you should just confirm that it looks "reasonable" in pants server
d

dry-policeman-7927

05/30/2019, 4:48 PM
@witty-crayon-22786 my changes will not change the representation in pants server. Sorry for bad explanation 🙈.
background
workunit will have
main
workunit as a parent only in zipkin attrs
w

witty-crayon-22786

05/30/2019, 4:51 PM
@dry-policeman-7927: would it be cleaner to change the workunit structure everywhere? it would be nice to be consistent if that is possible
reading more carefully, i think that what i'm suggesting is having some other new magic workunit that would be the parent of both
background
and
main
("`<root>`" or something)
and then maybe we'd skip rendering it in
./pants server
? and never include it in the name except for with zipkin?
4 Views