Skip to content

Commit

Permalink
Add XE 'Actions' into Profiler Event (#2397)
Browse files Browse the repository at this point in the history
* include XE actions into ProfilerEvent

* add null check for Action dictionary
  • Loading branch information
emchavez authored Oct 1, 2024
1 parent 679159b commit 245ea98
Showing 1 changed file with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,20 @@ private Task OnEventRead(IXEvent xEvent)
{
profileEvent.Values.Add(kvp.Key, kvp.Value.ToString());
}
// Add the XE 'actions'.
if(xEvent.Actions != null)
{
foreach (var kvp in xEvent.Actions)
{
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

0 comments on commit 245ea98

Please sign in to comment.