Spans in loops producing strange flame charts. #2707
-
I am converting our logging helper library for work to use I didn't know if this is expected or not so i thought maybe someone could help me fix my problem or tell me it is an issue. Unfortunately I can't share the code for my work, but i was able to make a reproducible example which suffers the same problem. Program Summery
ExpectationsFlame chart showing duration of each iteration of the processing loop. What happens (or at least what i think is happening)Iterations get stacked on top of each other, each iteration being within the previous iteration. This causes analytic programs to say crazy things like the processing thread was running longer than the program was running. CodeProduces undesirable results. Replacing
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
It looks like you are holding an |
Beta Was this translation helpful? Give feedback.
It looks like you are holding an
Entered
guard across anawait
point. This results in incorrect traces; the span should only be entered while it's being actively polled. See this documentation for details on what I think is the problem here.