Update HTTPEventSourceListener to trace the right events. (#2727)

This commit is contained in:
Tingluo Huang
2023-08-02 08:39:56 -04:00
committed by GitHub
parent f6e9809844
commit 8eefd849c1

View File

@@ -351,21 +351,39 @@ namespace GitHub.Runner.Listener.Check
private readonly Dictionary<string, HashSet<string>> _ignoredEvent = new() private readonly Dictionary<string, HashSet<string>> _ignoredEvent = new()
{ {
{ {
"Microsoft-System-Net-Http", "System.Net.Http",
new HashSet<string> new HashSet<string>
{ {
"Info", "Info",
"Associate", "Associate",
"Enter",
"Exit"
} }
}, },
{ {
"Microsoft-System-Net-Security", "System.Net.Security",
new HashSet<string>
{
"Info",
"DumpBuffer",
"SslStreamCtor",
"SecureChannelCtor",
"NoDelegateNoClientCert",
"CertsAfterFiltering",
"UsingCachedCredential",
"SspiSelectedCipherSuite"
}
},
{
"Private.InternalDiagnostics.System.Net.Http",
new HashSet<string>
{
"Info",
"Associate",
}
},
{
"Private.InternalDiagnostics.System.Net.Security",
new HashSet<string> new HashSet<string>
{ {
"Enter",
"Exit",
"Info", "Info",
"DumpBuffer", "DumpBuffer",
"SslStreamCtor", "SslStreamCtor",
@@ -391,8 +409,8 @@ namespace GitHub.Runner.Listener.Check
{ {
base.OnEventSourceCreated(eventSource); base.OnEventSourceCreated(eventSource);
if (eventSource.Name == "Microsoft-System-Net-Http" || if (eventSource.Name.Contains("System.Net.Http") ||
eventSource.Name == "Microsoft-System-Net-Security") eventSource.Name.Contains("System.Net.Security"))
{ {
EnableEvents(eventSource, EventLevel.Verbose, EventKeywords.All); EnableEvents(eventSource, EventLevel.Verbose, EventKeywords.All);
} }