diff --git a/src/libraries/Common/tests/System/Net/EventSourceTestLogging.cs b/src/libraries/Common/tests/System/Net/EventSourceTestLogging.cs index c7c2c5b79a2ee..6fcb67976931d 100644 --- a/src/libraries/Common/tests/System/Net/EventSourceTestLogging.cs +++ b/src/libraries/Common/tests/System/Net/EventSourceTestLogging.cs @@ -5,7 +5,7 @@ namespace System.Net.Test.Common { - [EventSource(Name = "Microsoft-System-Net-TestLogging")] + [EventSource(Name = "System.Net.TestLogging")] internal class EventSourceTestLogging : EventSource { private static EventSourceTestLogging s_log = new EventSourceTestLogging(); diff --git a/src/libraries/System.Diagnostics.Tracing/documentation/EventCounterTutorial.md b/src/libraries/System.Diagnostics.Tracing/documentation/EventCounterTutorial.md index f37f206219ee1..5269adc6f6774 100644 --- a/src/libraries/System.Diagnostics.Tracing/documentation/EventCounterTutorial.md +++ b/src/libraries/System.Diagnostics.Tracing/documentation/EventCounterTutorial.md @@ -12,7 +12,7 @@ Without further ado, here is an example on how to use the `EventCounter` ```c# // Give your event sources a descriptive name using the EventSourceAttribute, otherwise the name of the class is used. -[EventSource(Name = "Samples-EventCounterDemos-Minimal")] +[EventSource(Name = "Samples.EventCounterDemos.Minimal")] public sealed class MinimalEventCounterSource : EventSource { // define the singleton instance of the event source @@ -49,7 +49,7 @@ So, with that, we logged the metric to the `EventCounter`, but unless we can act There is an extra keyword that you will need to specify the turn on the EventCounters. ``` -PerfView /onlyProviders=*Samples-EventCounterDemos-Minimal:EventCounterIntervalSec=1 collect +PerfView /onlyProviders=*Samples.EventCounterDemos.Minimal:EventCounterIntervalSec=1 collect ``` Note the part about `EventCounterIntervalSec`, that indicate the frequency of the sampling. @@ -73,7 +73,7 @@ Notice that this command also logs the events, so we will get both the events an As we mentioned, to avoid overhead, sometimes we will want just the counters. This command can be used to log *only* the counters: ``` -PerfView /onlyProviders=*Samples-EventCounterDemos-Minimal:*:Critical:EventCounterIntervalSec=1 collect +PerfView /onlyProviders=*Samples.EventCounterDemos.Minimal:*:Critical:EventCounterIntervalSec=1 collect ``` Notice the `Critical` keyword in the command line, that is used to filter out the other events with lower priorities. diff --git a/src/libraries/System.Net.Http.WinHttpHandler/src/System/Net/Http/NetEventSource.WinHttpHandler.cs b/src/libraries/System.Net.Http.WinHttpHandler/src/System/Net/Http/NetEventSource.WinHttpHandler.cs index fd95566e57944..daac483268a70 100644 --- a/src/libraries/System.Net.Http.WinHttpHandler/src/System/Net/Http/NetEventSource.WinHttpHandler.cs +++ b/src/libraries/System.Net.Http.WinHttpHandler/src/System/Net/Http/NetEventSource.WinHttpHandler.cs @@ -5,7 +5,7 @@ namespace System.Net { - [EventSource(Name = "Microsoft-System-Net-Http-WinHttpHandler", LocalizationResources = "FxResources.System.Net.Http.WinHttpHandler.SR")] + [EventSource(Name = "Private.InternalDiagnostics.System.Net.Http.WinHttpHandler", LocalizationResources = "FxResources.System.Net.Http.WinHttpHandler.SR")] internal sealed partial class NetEventSource : EventSource { } diff --git a/src/libraries/System.Net.Http/src/System/Net/Http/NetEventSource.Http.cs b/src/libraries/System.Net.Http/src/System/Net/Http/NetEventSource.Http.cs index fb6e3de2e09d8..3213395289123 100644 --- a/src/libraries/System.Net.Http/src/System/Net/Http/NetEventSource.Http.cs +++ b/src/libraries/System.Net.Http/src/System/Net/Http/NetEventSource.Http.cs @@ -7,7 +7,7 @@ namespace System.Net { - [EventSource(Name = "Microsoft-System-Net-Http", LocalizationResources = "FxResources.System.Net.Http.SR")] + [EventSource(Name = "Private.InternalDiagnostics.System.Net.Http", LocalizationResources = "FxResources.System.Net.Http.SR")] internal sealed partial class NetEventSource : EventSource { private const int UriBaseAddressId = NextAvailableEventId; diff --git a/src/libraries/System.Net.Http/tests/FunctionalTests/DiagnosticsTests.cs b/src/libraries/System.Net.Http/tests/FunctionalTests/DiagnosticsTests.cs index ce7503f76e514..e5925630a1294 100644 --- a/src/libraries/System.Net.Http/tests/FunctionalTests/DiagnosticsTests.cs +++ b/src/libraries/System.Net.Http/tests/FunctionalTests/DiagnosticsTests.cs @@ -30,14 +30,13 @@ public abstract class DiagnosticsTest : HttpClientHandlerTestBase public DiagnosticsTest(ITestOutputHelper output) : base(output) { } [Fact] - public static void EventSource_ExistsWithCorrectId() + public void EventSource_ExistsWithCorrectId() { - Type esType = typeof(HttpClient).GetTypeInfo().Assembly - .GetType("System.Net.NetEventSource", throwOnError: true, ignoreCase: false); + Type esType = typeof(HttpClient).Assembly.GetType("System.Net.NetEventSource", throwOnError: true, ignoreCase: false); Assert.NotNull(esType); - Assert.Equal("Microsoft-System-Net-Http", EventSource.GetName(esType)); - Assert.Equal(Guid.Parse("bdd9a83e-1929-5482-0d73-2fe5e1c0e16d"), EventSource.GetGuid(esType)); + Assert.Equal("Private.InternalDiagnostics.System.Net.Http", EventSource.GetName(esType)); + Assert.Equal(Guid.Parse("a60cec70-947b-5b80-efe2-7c5547b99b3d"), EventSource.GetGuid(esType)); Assert.NotEmpty(EventSource.GenerateManifest(esType, "assemblyPathToIncludeInManifest")); } @@ -183,7 +182,7 @@ public void SendAsync_HttpTracingEnabled_Succeeds(bool useSsl) { RemoteExecutor.Invoke(async (useVersionString, useSslString) => { - using (var listener = new TestEventListener("Microsoft-System-Net-Http", EventLevel.Verbose)) + using (var listener = new TestEventListener("Private.InternalDiagnostics.System.Net.Http", EventLevel.Verbose)) { var events = new ConcurrentQueue(); await listener.RunWithCallbackAsync(events.Enqueue, async () => diff --git a/src/libraries/System.Net.Http/tests/StressTests/HttpStress/Program.cs b/src/libraries/System.Net.Http/tests/StressTests/HttpStress/Program.cs index b2e3c2b8f0429..7496838b979f4 100644 --- a/src/libraries/System.Net.Http/tests/StressTests/HttpStress/Program.cs +++ b/src/libraries/System.Net.Http/tests/StressTests/HttpStress/Program.cs @@ -46,7 +46,7 @@ private static bool TryParseCli(string[] args, [NotNullWhen(true)] out Configura cmd.AddOption(new Option("-connectionLifetime", "Max connection lifetime length (milliseconds).") { Argument = new Argument("connectionLifetime", null) }); cmd.AddOption(new Option("-ops", "Indices of the operations to use") { Argument = new Argument("space-delimited indices", null) }); cmd.AddOption(new Option("-xops", "Indices of the operations to exclude") { Argument = new Argument("space-delimited indices", null) }); - cmd.AddOption(new Option("-trace", "Enable Microsoft-System-Net-Http tracing.") { Argument = new Argument("\"console\" or path") }); + cmd.AddOption(new Option("-trace", "Enable System.Net.Http.InternalDiagnostics tracing.") { Argument = new Argument("\"console\" or path") }); cmd.AddOption(new Option("-aspnetlog", "Enable ASP.NET warning and error logging.") { Argument = new Argument("enable", false) }); cmd.AddOption(new Option("-listOps", "List available options.") { Argument = new Argument("enable", false) }); cmd.AddOption(new Option("-seed", "Seed for generating pseudo-random parameters for a given -n argument.") { Argument = new Argument("seed", null) }); diff --git a/src/libraries/System.Net.Http/tests/StressTests/HttpStress/StressServer.cs b/src/libraries/System.Net.Http/tests/StressTests/HttpStress/StressServer.cs index 6bf834b8ef970..6d251ba0dd224 100644 --- a/src/libraries/System.Net.Http/tests/StressTests/HttpStress/StressServer.cs +++ b/src/libraries/System.Net.Http/tests/StressTests/HttpStress/StressServer.cs @@ -351,7 +351,7 @@ private sealed class HttpEventListener : EventListener protected override void OnEventSourceCreated(EventSource eventSource) { - if (eventSource.Name == "Microsoft-System-Net-Http") + if (eventSource.Name == "Private.InternalDiagnostics.System.Net.Http") EnableEvents(eventSource, EventLevel.LogAlways); } diff --git a/src/libraries/System.Net.HttpListener/src/System/Net/NetEventSource.HttpListener.cs b/src/libraries/System.Net.HttpListener/src/System/Net/NetEventSource.HttpListener.cs index 76531b931d999..b1e28de72bb06 100644 --- a/src/libraries/System.Net.HttpListener/src/System/Net/NetEventSource.HttpListener.cs +++ b/src/libraries/System.Net.HttpListener/src/System/Net/NetEventSource.HttpListener.cs @@ -5,7 +5,7 @@ namespace System.Net { - [EventSource(Name = "Microsoft-System-Net-HttpListener", LocalizationResources = "FxResources.System.Net.HttpListener.SR")] + [EventSource(Name = "Private.InternalDiagnostics.System.Net.HttpListener", LocalizationResources = "FxResources.System.Net.HttpListener.SR")] internal sealed partial class NetEventSource { } diff --git a/src/libraries/System.Net.Mail/src/System/Net/Mail/NetEventSource.Mail.cs b/src/libraries/System.Net.Mail/src/System/Net/Mail/NetEventSource.Mail.cs index ddfeefc3ca2e5..59bd06e01777c 100644 --- a/src/libraries/System.Net.Mail/src/System/Net/Mail/NetEventSource.Mail.cs +++ b/src/libraries/System.Net.Mail/src/System/Net/Mail/NetEventSource.Mail.cs @@ -7,6 +7,6 @@ namespace System.Net { - [EventSource(Name = "Microsoft-System-Net-Mail", LocalizationResources = "FxResources.System.Net.Mail.SR")] + [EventSource(Name = "Private.InternalDiagnostics.System.Net.Mail", LocalizationResources = "FxResources.System.Net.Mail.SR")] internal sealed partial class NetEventSource { } } diff --git a/src/libraries/System.Net.Mail/tests/Functional/LoggingTest.cs b/src/libraries/System.Net.Mail/tests/Functional/LoggingTest.cs index cb782bee94dd1..65c9d1c10abe0 100644 --- a/src/libraries/System.Net.Mail/tests/Functional/LoggingTest.cs +++ b/src/libraries/System.Net.Mail/tests/Functional/LoggingTest.cs @@ -17,8 +17,8 @@ public void EventSource_ExistsWithCorrectId() Type esType = typeof(SmtpClient).Assembly.GetType("System.Net.NetEventSource", throwOnError: true, ignoreCase: false); Assert.NotNull(esType); - Assert.Equal("Microsoft-System-Net-Mail", EventSource.GetName(esType)); - Assert.Equal(Guid.Parse("42c8027b-f048-58d2-537d-a4a9d5ee7038"), EventSource.GetGuid(esType)); + Assert.Equal("Private.InternalDiagnostics.System.Net.Mail", EventSource.GetName(esType)); + Assert.Equal(Guid.Parse("6fff04ac-5aab-530c-03b3-b1b32d2538e9"), EventSource.GetGuid(esType)); Assert.NotEmpty(EventSource.GenerateManifest(esType, esType.Assembly.Location)); } @@ -28,7 +28,7 @@ public void EventSource_EventsRaisedAsExpected() { RemoteExecutor.Invoke(() => { - using (var listener = new TestEventListener("Microsoft-System-Net-Mail", EventLevel.Verbose)) + using (var listener = new TestEventListener("Private.InternalDiagnostics.System.Net.Mail", EventLevel.Verbose)) { var events = new ConcurrentQueue(); listener.RunWithCallback(events.Enqueue, () => diff --git a/src/libraries/System.Net.NameResolution/src/System/Net/NetEventSource.NameResolution.cs b/src/libraries/System.Net.NameResolution/src/System/Net/NetEventSource.NameResolution.cs index 66bd7c598a5c9..f8a323e4ad8a3 100644 --- a/src/libraries/System.Net.NameResolution/src/System/Net/NetEventSource.NameResolution.cs +++ b/src/libraries/System.Net.NameResolution/src/System/Net/NetEventSource.NameResolution.cs @@ -5,6 +5,6 @@ namespace System.Net { - [EventSource(Name = "Microsoft-System-Net-NameResolution")] + [EventSource(Name = "Private.InternalDiagnostics.System.Net.NameResolution")] internal sealed partial class NetEventSource { } } diff --git a/src/libraries/System.Net.NameResolution/tests/FunctionalTests/LoggingTest.cs b/src/libraries/System.Net.NameResolution/tests/FunctionalTests/LoggingTest.cs index c959706956a51..d8921a09a5581 100644 --- a/src/libraries/System.Net.NameResolution/tests/FunctionalTests/LoggingTest.cs +++ b/src/libraries/System.Net.NameResolution/tests/FunctionalTests/LoggingTest.cs @@ -21,11 +21,11 @@ public class LoggingTest [Fact] public static void EventSource_ExistsWithCorrectId() { - Type esType = typeof(Dns).GetTypeInfo().Assembly.GetType("System.Net.NetEventSource", throwOnError: true, ignoreCase: false); + Type esType = typeof(Dns).Assembly.GetType("System.Net.NetEventSource", throwOnError: true, ignoreCase: false); Assert.NotNull(esType); - Assert.Equal("Microsoft-System-Net-NameResolution", EventSource.GetName(esType)); - Assert.Equal(Guid.Parse("5f302add-3825-520e-8fa0-627b206e2e7e"), EventSource.GetGuid(esType)); + Assert.Equal("Private.InternalDiagnostics.System.Net.NameResolution", EventSource.GetName(esType)); + Assert.Equal(Guid.Parse("460a591a-715b-5647-5264-944bef811147"), EventSource.GetGuid(esType)); Assert.NotEmpty(EventSource.GenerateManifest(esType, "assemblyPathToIncludeInManifest")); } @@ -33,7 +33,7 @@ public static void EventSource_ExistsWithCorrectId() [ConditionalFact] public void GetHostEntry_InvalidHost_LogsError() { - using (var listener = new TestEventListener("Microsoft-System-Net-NameResolution", EventLevel.Error)) + using (var listener = new TestEventListener("Private.InternalDiagnostics.System.Net.NameResolution", EventLevel.Error)) { var events = new ConcurrentQueue(); @@ -68,7 +68,7 @@ public void GetHostEntry_InvalidHost_LogsError() [PlatformSpecific(~TestPlatforms.Windows)] // Unreliable on Windows. public void GetHostEntryAsync_InvalidHost_LogsError() { - using (var listener = new TestEventListener("Microsoft-System-Net-NameResolution", EventLevel.Error)) + using (var listener = new TestEventListener("Private.InternalDiagnostics.System.Net.NameResolution", EventLevel.Error)) { var events = new ConcurrentQueue(); @@ -102,7 +102,7 @@ public void GetHostEntryAsync_InvalidHost_LogsError() [ConditionalFact] public void GetHostEntry_ValidName_NoErrors() { - using (var listener = new TestEventListener("Microsoft-System-Net-NameResolution", EventLevel.Verbose)) + using (var listener = new TestEventListener("Private.InternalDiagnostics.System.Net.NameResolution", EventLevel.Verbose)) { var events = new ConcurrentQueue(); diff --git a/src/libraries/System.Net.NetworkInformation/src/System/Net/NetworkInformation/NetEventSource.NetworkInformation.cs b/src/libraries/System.Net.NetworkInformation/src/System/Net/NetworkInformation/NetEventSource.NetworkInformation.cs index 96d96be30626b..73575689b1e41 100644 --- a/src/libraries/System.Net.NetworkInformation/src/System/Net/NetworkInformation/NetEventSource.NetworkInformation.cs +++ b/src/libraries/System.Net.NetworkInformation/src/System/Net/NetworkInformation/NetEventSource.NetworkInformation.cs @@ -5,6 +5,6 @@ namespace System.Net { - [EventSource(Name = "Microsoft-System-Net-NetworkInformation")] + [EventSource(Name = "Private.InternalDiagnostics.System.Net.NetworkInformation")] internal sealed partial class NetEventSource { } } diff --git a/src/libraries/System.Net.NetworkInformation/tests/FunctionalTests/LoggingTest.cs b/src/libraries/System.Net.NetworkInformation/tests/FunctionalTests/LoggingTest.cs index 7ae8dfd7ef453..b2c131f76f14b 100644 --- a/src/libraries/System.Net.NetworkInformation/tests/FunctionalTests/LoggingTest.cs +++ b/src/libraries/System.Net.NetworkInformation/tests/FunctionalTests/LoggingTest.cs @@ -14,8 +14,8 @@ public void EventSource_ExistsWithCorrectId() Type esType = typeof(NetworkChange).Assembly.GetType("System.Net.NetEventSource", throwOnError: false, ignoreCase: false); if (esType != null) { - Assert.Equal("Microsoft-System-Net-NetworkInformation", EventSource.GetName(esType)); - Assert.Equal(Guid.Parse("b8e42167-0eb2-5e39-97b5-acaca593d3a2"), EventSource.GetGuid(esType)); + Assert.Equal("Private.InternalDiagnostics.System.Net.NetworkInformation", EventSource.GetName(esType)); + Assert.Equal(Guid.Parse("e090a35b-1033-5de3-89e3-01cde7c158ce"), EventSource.GetGuid(esType)); Assert.NotEmpty(EventSource.GenerateManifest(esType, esType.Assembly.Location)); } diff --git a/src/libraries/System.Net.Ping/src/System/Net/NetworkInformation/NetEventSource.Ping.cs b/src/libraries/System.Net.Ping/src/System/Net/NetworkInformation/NetEventSource.Ping.cs index cf22e0635eeb0..ec0a5dbccf420 100644 --- a/src/libraries/System.Net.Ping/src/System/Net/NetworkInformation/NetEventSource.Ping.cs +++ b/src/libraries/System.Net.Ping/src/System/Net/NetworkInformation/NetEventSource.Ping.cs @@ -5,6 +5,6 @@ namespace System.Net { - [EventSource(Name = "Microsoft-System-Net-Ping")] + [EventSource(Name = "Private.InternalDiagnostics.System.Net.Ping")] internal sealed partial class NetEventSource { } } diff --git a/src/libraries/System.Net.Ping/tests/FunctionalTests/LoggingTest.cs b/src/libraries/System.Net.Ping/tests/FunctionalTests/LoggingTest.cs index 08d7a59f508bf..6815a4550a13d 100644 --- a/src/libraries/System.Net.Ping/tests/FunctionalTests/LoggingTest.cs +++ b/src/libraries/System.Net.Ping/tests/FunctionalTests/LoggingTest.cs @@ -14,8 +14,8 @@ public void EventSource_ExistsWithCorrectId() Type esType = typeof(Ping).Assembly.GetType("System.Net.NetEventSource", throwOnError: false, ignoreCase: false); if (esType != null) { - Assert.Equal("Microsoft-System-Net-Ping", EventSource.GetName(esType)); - Assert.Equal(Guid.Parse("a771ec4a-7260-59ce-0475-db257437ed8c"), EventSource.GetGuid(esType)); + Assert.Equal("Private.InternalDiagnostics.System.Net.Ping", EventSource.GetName(esType)); + Assert.Equal(Guid.Parse("37627c1f-34a9-539e-ab8c-84303b966b74"), EventSource.GetGuid(esType)); Assert.NotEmpty(EventSource.GenerateManifest(esType, esType.Assembly.Location)); } } diff --git a/src/libraries/System.Net.Primitives/src/System/Net/NetEventSource.Primitives.cs b/src/libraries/System.Net.Primitives/src/System/Net/NetEventSource.Primitives.cs index 410590649e3a8..1d79653d1daaf 100644 --- a/src/libraries/System.Net.Primitives/src/System/Net/NetEventSource.Primitives.cs +++ b/src/libraries/System.Net.Primitives/src/System/Net/NetEventSource.Primitives.cs @@ -5,6 +5,6 @@ namespace System.Net { - [EventSource(Name = "Microsoft-System-Net-Primitives")] + [EventSource(Name = "Private.InternalDiagnostics.System.Net.Primitives")] internal sealed partial class NetEventSource { } } diff --git a/src/libraries/System.Net.Primitives/tests/FunctionalTests/LoggingTest.cs b/src/libraries/System.Net.Primitives/tests/FunctionalTests/LoggingTest.cs index df341dc44d61f..73ff7b39c685e 100644 --- a/src/libraries/System.Net.Primitives/tests/FunctionalTests/LoggingTest.cs +++ b/src/libraries/System.Net.Primitives/tests/FunctionalTests/LoggingTest.cs @@ -17,8 +17,8 @@ public void EventSource_ExistsWithCorrectId() Type esType = typeof(IPAddress).Assembly.GetType("System.Net.NetEventSource", throwOnError: true, ignoreCase: false); Assert.NotNull(esType); - Assert.Equal("Microsoft-System-Net-Primitives", EventSource.GetName(esType)); - Assert.Equal(Guid.Parse("a9f9e4e1-0cf5-5005-b530-3d37959d5e84"), EventSource.GetGuid(esType)); + Assert.Equal("Private.InternalDiagnostics.System.Net.Primitives", EventSource.GetName(esType)); + Assert.Equal(Guid.Parse("534f3517-0a04-520f-9d69-4778dd119fe1"), EventSource.GetGuid(esType)); Assert.NotEmpty(EventSource.GenerateManifest(esType, esType.Assembly.Location)); } @@ -28,7 +28,7 @@ public void EventSource_EventsRaisedAsExpected() { RemoteExecutor.Invoke(() => { - using (var listener = new TestEventListener("Microsoft-System-Net-Primitives", EventLevel.Verbose)) + using (var listener = new TestEventListener("Private.InternalDiagnostics.System.Net.Primitives", EventLevel.Verbose)) { var events = new ConcurrentQueue(); listener.RunWithCallback(events.Enqueue, () => diff --git a/src/libraries/System.Net.Requests/src/System/Net/NetEventSource.Requests.cs b/src/libraries/System.Net.Requests/src/System/Net/NetEventSource.Requests.cs index 68d29aa461ccf..5bfc9d8c456ca 100644 --- a/src/libraries/System.Net.Requests/src/System/Net/NetEventSource.Requests.cs +++ b/src/libraries/System.Net.Requests/src/System/Net/NetEventSource.Requests.cs @@ -5,6 +5,6 @@ namespace System.Net { - [EventSource(Name = "Microsoft-System-Net-Requests")] + [EventSource(Name = "Private.InternalDiagnostics.System.Net.Requests")] internal sealed partial class NetEventSource { } } diff --git a/src/libraries/System.Net.Requests/tests/LoggingTest.cs b/src/libraries/System.Net.Requests/tests/LoggingTest.cs index 1c17bcf4bdd5e..58babaae5e233 100644 --- a/src/libraries/System.Net.Requests/tests/LoggingTest.cs +++ b/src/libraries/System.Net.Requests/tests/LoggingTest.cs @@ -15,8 +15,8 @@ public void EventSource_ExistsWithCorrectId() Type esType = typeof(WebRequest).Assembly.GetType("System.Net.NetEventSource", throwOnError: true, ignoreCase: false); Assert.NotNull(esType); - Assert.Equal("Microsoft-System-Net-Requests", EventSource.GetName(esType)); - Assert.Equal(Guid.Parse("3763dc7e-7046-5576-9041-5616e21cc2cf"), EventSource.GetGuid(esType)); + Assert.Equal("Private.InternalDiagnostics.System.Net.Requests", EventSource.GetName(esType)); + Assert.Equal(Guid.Parse("de972c9f-4457-5dc5-e37b-aaf8033eb3a9"), EventSource.GetGuid(esType)); Assert.NotEmpty(EventSource.GenerateManifest(esType, esType.Assembly.Location)); } diff --git a/src/libraries/System.Net.Security/src/System/Net/Security/NetEventSource.Security.cs b/src/libraries/System.Net.Security/src/System/Net/Security/NetEventSource.Security.cs index cb69588fc6671..0f2c58d0a18a0 100644 --- a/src/libraries/System.Net.Security/src/System/Net/Security/NetEventSource.Security.cs +++ b/src/libraries/System.Net.Security/src/System/Net/Security/NetEventSource.Security.cs @@ -11,7 +11,7 @@ namespace System.Net { - [EventSource(Name = "Microsoft-System-Net-Security", LocalizationResources = "FxResources.System.Net.Security.SR")] + [EventSource(Name = "Private.InternalDiagnostics.System.Net.Security", LocalizationResources = "FxResources.System.Net.Security.SR")] internal sealed partial class NetEventSource { private const int SecureChannelCtorId = NextAvailableEventId; diff --git a/src/libraries/System.Net.Security/tests/FunctionalTests/LoggingTest.cs b/src/libraries/System.Net.Security/tests/FunctionalTests/LoggingTest.cs index 5dc937f8f434a..c3b1ee33e7a69 100644 --- a/src/libraries/System.Net.Security/tests/FunctionalTests/LoggingTest.cs +++ b/src/libraries/System.Net.Security/tests/FunctionalTests/LoggingTest.cs @@ -17,8 +17,8 @@ public void EventSource_ExistsWithCorrectId() Type esType = typeof(SslStream).Assembly.GetType("System.Net.NetEventSource", throwOnError: true, ignoreCase: false); Assert.NotNull(esType); - Assert.Equal("Microsoft-System-Net-Security", EventSource.GetName(esType)); - Assert.Equal(Guid.Parse("066c0e27-a02d-5a98-9a4d-078cc3b1a896"), EventSource.GetGuid(esType)); + Assert.Equal("Private.InternalDiagnostics.System.Net.Security", EventSource.GetName(esType)); + Assert.Equal(Guid.Parse("a0d627f0-c0f5-5a45-558a-6634a894c155"), EventSource.GetGuid(esType)); Assert.NotEmpty(EventSource.GenerateManifest(esType, esType.Assembly.Location)); } @@ -28,7 +28,7 @@ public void EventSource_EventsRaisedAsExpected() { RemoteExecutor.Invoke(() => { - using (var listener = new TestEventListener("Microsoft-System-Net-Security", EventLevel.Verbose)) + using (var listener = new TestEventListener("Private.InternalDiagnostics.System.Net.Security", EventLevel.Verbose)) { var events = new ConcurrentQueue(); listener.RunWithCallback(events.Enqueue, () => diff --git a/src/libraries/System.Net.Sockets/src/System/Net/Sockets/NetEventSource.Sockets.cs b/src/libraries/System.Net.Sockets/src/System/Net/Sockets/NetEventSource.Sockets.cs index fdedfb426cee0..3c9be9dcd072d 100644 --- a/src/libraries/System.Net.Sockets/src/System/Net/Sockets/NetEventSource.Sockets.cs +++ b/src/libraries/System.Net.Sockets/src/System/Net/Sockets/NetEventSource.Sockets.cs @@ -8,7 +8,7 @@ namespace System.Net { - [EventSource(Name = "Microsoft-System-Net-Sockets", Guid = "e03c0352-f9c9-56ff-0ea7-b94ba8cabc6b", LocalizationResources = "FxResources.System.Net.Sockets.SR")] + [EventSource(Name = "Private.InternalDiagnostics.System.Net.Sockets", LocalizationResources = "FxResources.System.Net.Sockets.SR")] internal sealed partial class NetEventSource { private const int AcceptedId = NextAvailableEventId; diff --git a/src/libraries/System.Net.Sockets/tests/FunctionalTests/LoggingTest.cs b/src/libraries/System.Net.Sockets/tests/FunctionalTests/LoggingTest.cs index 75f851ebc975f..0dd31ae386d71 100644 --- a/src/libraries/System.Net.Sockets/tests/FunctionalTests/LoggingTest.cs +++ b/src/libraries/System.Net.Sockets/tests/FunctionalTests/LoggingTest.cs @@ -25,8 +25,8 @@ public static void EventSource_ExistsWithCorrectId() Type esType = typeof(Socket).Assembly.GetType("System.Net.NetEventSource", throwOnError: true, ignoreCase: false); Assert.NotNull(esType); - Assert.Equal("Microsoft-System-Net-Sockets", EventSource.GetName(esType)); - Assert.Equal(Guid.Parse("e03c0352-f9c9-56ff-0ea7-b94ba8cabc6b"), EventSource.GetGuid(esType)); + Assert.Equal("Private.InternalDiagnostics.System.Net.Sockets", EventSource.GetName(esType)); + Assert.Equal(Guid.Parse("ae391de7-a2cb-557c-dd34-fe00d0b98c7f"), EventSource.GetGuid(esType)); Assert.NotEmpty(EventSource.GenerateManifest(esType, esType.Assembly.Location)); } @@ -37,7 +37,7 @@ public void EventSource_EventsRaisedAsExpected() { RemoteExecutor.Invoke(() => { - using (var listener = new TestEventListener("Microsoft-System-Net-Sockets", EventLevel.Verbose)) + using (var listener = new TestEventListener("Private.InternalDiagnostics.System.Net.Sockets", EventLevel.Verbose)) { var events = new ConcurrentQueue(); listener.RunWithCallback(events.Enqueue, () => diff --git a/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/EventSource.cs b/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/EventSource.cs index afec9bbaa1145..b72f387e84d96 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/EventSource.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/EventSource.cs @@ -211,7 +211,7 @@ namespace System.Diagnostics.Tracing /// /// This is a minimal definition for a custom event source: /// - /// [EventSource(Name="Samples-Demos-Minimal")] + /// [EventSource(Name="Samples.Demos.Minimal")] /// sealed class MinimalEventSource : EventSource /// { /// public static MinimalEventSource Log = new MinimalEventSource();