1

When you create a stateless reliable service project with visual studio, you get a custom event source that sub-classes EventSource class from .net framework. Since the EventSource is same as ETW's event provider, there has to be a unique GUID associated with it (to distinguish from other ETW providers). In addition, ETW requires the manifest file for tracing to work properly. The EventSource is probably hiding all this information from the developer. Is there a way to view ETW's provider information (that came out of my custom EventSource in my service) along with ETW manifest file?

Raghu
  • 2,859
  • 4
  • 33
  • 65
  • did you see this question?: http://stackoverflow.com/questions/18913364/eventsource-net-4-0-generatemanifest – LoekD Aug 31 '16 at 12:30

2 Answers2

2

This turned out to be extremely simple. The EventSource class has following static method:

public static string GenerateManifest(
   Type eventSourceType,
   string assemblyPathToIncludeInManifest
)

When you debug your service fabric service, you can do following:

System.Diagnostics.Debug.WriteLine(System.Diagnostics.Tracing.EventSource.GenerateManifest(typeof(ServiceEventSource), "C:\temp"))

It should give you nicely formatted manifest xml.

Raghu
  • 2,859
  • 4
  • 33
  • 65
0

You can simply install the following nuGet package in the project which has custom event source that sub-classes EventSource class

Microsoft.Diagnostics.Tracing.EventRegister

Upon building the project you will get the manifest and dll file in the bin directory.

Arnab
  • 555
  • 1
  • 7
  • 12