-
Notifications
You must be signed in to change notification settings - Fork 710
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Missing activity in case of "broken" ActivityID in events #2122
Comments
@brianrob - do you think we should treat this guid encoding convention as a public convention of the runtime? Currently our docs warn against tools making use of this encoding but it feels wrong if we are telling other tools not to use it but then PerfView appears to be relying on it. I agree with all the analysis except I think the boundary checks are off-by-one? Looking at the BCL code I'd expect the issue could occur anywhere (value > 0xFF) && (value <= 0xFFF). |
If I recall correctly, it's not guaranteed that the GUID provided will be decodable. If it's not, then we'd just show the GUID. That being said, I think it's reasonable to treat it as public with that caveat. Also reasonable to make fixes to make it work better. Tools just need to know that if it doesn't work, you don't crash or misbehave, you just treat it as a GUID. |
You're right @noahfalk :^) |
The "meaning" of the GUID (i.e. its encoding of information) is important because is allows correlations. For example, network events are connected thanks to child activities stacked from an initial HTTP request but not with RelatedActivityID. This is how I will be able to show the duration of each phase from DNS, HTTPS to request/response times. Without the activities correlation, there is not much one can extract from these events. BTW, it is possible to find a document that describe this kind of need - https://studylib.net/doc/6851938/eventsource-activity-support |
There is a bug in the BCL that generates 00 byte in an event ActivityID GUID that leads to stopping the parsing and "hidding" final activities.
Since each Start/Stop action is adding an activity, I was expecting to see them (i.e.
/1/4/2000/xx/
instead of/1/4/2000/
However, the GUID seemed to contain the missing xx value like in the second 32 value -0010- or -0020-.
These output were generated to analyze network events (HTTP, socket, security, DNS).
This happens only when a 12 bits value is stored AND the high bits are stored in the low nibble of a byte. The following code update in StartStopActivityComputer.cs seems to avoid the problem and supports the proposed fix in the BCL:
Note: feel free to use this test app to debug and validate the fix.
The text was updated successfully, but these errors were encountered: