-
Notifications
You must be signed in to change notification settings - Fork 113
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
Record StackTraceHiddenAttribute
when collecting stacks and exceptions
#7493
base: main
Are you sure you want to change the base?
Conversation
StackTraceHiddenAttribute
when collecting stacks and exceptionsStackTraceHiddenAttribute
when collecting stacks and exceptions
@@ -46,6 +46,7 @@ HRESULT StacksEventProvider::WriteClassData(ClassID classId, const ClassData& cl | |||
static_cast<UINT64>(classData.GetModuleId()), | |||
classData.GetToken(), | |||
static_cast<UINT32>(classData.GetFlags()), | |||
classData.GetStackTraceHidden(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
note: this relies on an implicit cast from bool
to UINT32
. If folks would prefer that this become an explicit static_cast<UINT32>
let me know.
{ | ||
return Convert.ToBoolean(GetPayload<uint>(traceEvent, index)); | ||
} | ||
|
||
public static T GetPayload<T>(this TraceEvent traceEvent, int index) | ||
{ | ||
return (T)traceEvent.PayloadValue(index); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
note: I plan on updating this with a DEBUG
check to prevent us accidentally calling it with <bool>
. This will happen in a separate PR since we have an instance of using GetPayload<bool>
elsewhere in dotnet-monitor that needs to get fixed first.
Summary
When collecting
/stacks
and/exceptions
data, also record where theStackTraceHiddenAttribute
is present. To keep PRs small and easier to review, this PR does not change the API surface, it is only focused on collecting this information and sending it to dotnet-monitor over event source. A follow up PR will expose this new information and add functional tests.Note that we use a
UINT32
to transmit this information over event source instead of a boolean. This is due to a bug in event source regarding the size of bools. A separate PR will be made to fix an existing instance of this elsewhere in dotnet-monitor.Release Notes Entry