I am launching the first sample ServiceFabric (Preview version 1.4.87): https://azure.microsoft.com/en-us/documentation/articles/service-fabric-create-your-first-application-in-visual-studio/ , to create a stateful service, and although the sample works correctly, I do not see the ETW output log information in the diagnostic window.
The log call is recorded in ServiceEventSource.Current.ServiceMessage(...) , but when this method (implemented in ServiceEventSource.cs) is launched, the call to this.IsEnabled() returns false, so no diagnostics are recorded. If I disconnect the IsEnabled() call in the debug state, nothing is still written to the diagnostics window, which simply contains messages about the application launching.
Diagnostic-configured providers are standard:
Microsoft-ServiceFabric-Actors Microsoft-ServiceFabric-Services cbd93bc2-71e5-4566-b3a7-595d8eeca6e8:5:0x4000000000000000
I added Microsoft-ServiceFabric to this list, but it just makes me register a lot more, but still not my output messages.
I also run PerfView, and then, looking at the available providers, the first two above do not exist: Microsoft-ServiceFabric-Actors and Microsoft-ServiceFabric-Services.
Any idea? It seems that this is either a pure problem with ETW, or some ServiceFabric configuration error, possibly a wrong vendor specification in the diagnostic window.
I am running Win10, VS2015 Enterprise x64.
[change] Calling ServiceEventSource.Current.ServiceTypeRegistered(Process.GetCurrentProcess().Id, typeof(MyStatefulService).Name) also does not write anything to Program.cs. The only posts I have:
Service Created: Service fabric:/MyApplication/MyStatefulService partition 9505f2b3-dee5-4ea7-96b7-c861407b5283 of ServiceType MyStatefulServiceType created in Application fabric:/MyApplication ApplicationType MyApplicationType. RunAsync has been invoked for a stateful service replica. Application Type Name: MyApplicationType, Application Name: fabric:/MyApplication, Service Type Name: MyStatefulServiceType, Service Name: fabric:/MyApplication/MyStatefulService, Partition Id: 9505f2b3-dee5-4ea7-96b7-c861407b5283, Replica Id: 130996049833056865", The Resource Balancer completed the Creation phase and consequently issued the action -- Add on Service -- fabric:/MyApplication/MyStatefulService Partition -- 9505f2b3-dee5-4ea7-96b7-c861407b5283 with (if relevant) SourceNode -- N/A and TargetNode -- Node.2.
(repeat for other nodes)