Skip to content
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

Add XE 'Actions' into Profiler Event #2397

Merged
merged 2 commits into from
Oct 1, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,17 @@ private Task OnEventRead(IXEvent xEvent)
{
profileEvent.Values.Add(kvp.Key, kvp.Value.ToString());
}
// Add the XE 'actions'.
foreach (var kvp in xEvent.Actions)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume Actions can never be null here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will add a explicit check for this, otherwise this would generate exception

{
string key = kvp.Key;
if (profileEvent.Values.ContainsKey(key))
{
// Append a postfix to avoid duplicate keys while keeping the data.
key += " (action)";
}
profileEvent.Values.Add(key, kvp.Value.ToString());
}
CurrentObservers.ForEach(o => o.OnNext(profileEvent));
return Task.FromResult(0);
}
Expand Down