Reputation: 129
I am trying to view the same messages that are shown in the Diagnostic Events tab when I debug my local service fabric cluster. Either directly, or after they have been saved to an etl file.
I have sent custom log messages using the ServiceEventSource class that was created when I used the service fabric stateful service template. I can clearly see log messages in the diagnostic events tab when running the service in debug mode.
I have tried to use LinqPad, which is nice, but I can’t seem to A) find the name of the session, or B) find where any .etl file is saved when I’m debugging my service fabric service. I have also tried to use PerfView to capture and create the .etl file. I used “machine wide” for the focus process and sent the etl data to my desktop. I kept the default 500mb file, which I did not hit before I seen messages in the Visual Studio diagnostic events tab. I then stopped PerfView, loaded the .etl file into LinqPad, which was able to parse, but I could not find any of the events that were displayed in the diagnostic events tab. I did see lots and lots of system wide messages though – so PerfView did collect something.
I am hoping to collect the event data, or stream it (ideally) using LinqPad and the TX extension. However I am new to ETW and I am not clear how to set up the stream, or gather and save the data into an .etl file.
Upvotes: 1
Views: 160
Reputation: 129
I was able to gather this data. When using PerfView I could filter on “additional providers”. I found that the name of a provider that matched my project was not found when searching though the “provider browser”. However, I manually typed the name of the provider, which was found in the class that inherited from EventSource: [EventSource(Name = "My.Provider.Name.Here")]
. After starting the collection, running the app, and examining the results, I found that my log messages were collected. Perhaps that info will help another that is trying to do the same thing.
Upvotes: 2