locked
Logging Call Duration for each WCF call RRS feed

  • Question

  • Hi,

    When I enable WCF logging, I can see the entire message in XML form in the trace file. It does not contain the Duration the call took to complete.

    WCF must be having this information per call as it already has the Performance counter : Calls Duration.

    How can we log the duration of each call?

    Thanks,
    Yash

    Sunday, December 19, 2010 6:32 AM

Answers

  • Hi,

    If you are hosting in IIS 7.0 or 7.5 you can get WCF call execution statistics using Windows Server AppFabric.

    http://msdn.microsoft.com/en-us/windowsserver/ee695849

    AppFabric is included in the Windows licence, and uses Event Tracing for Windows (ETW) to track service execution statistics to a database. As long as your WCF code is compiled with a .NET 4 compiler, tracking will require no code changes.

    AppFabric woll not track the execution time of every call for performance reasons. It will aggregate the average execution over a 10 second window for each service method. The statistics can be queried from the AppFabric Dashboard in IIS manager, or a custom interface.

    This may be a good way to get the statistics you need.

    Regards,

    Alan

     


    http://www.CloudCasts.net - Community Webcasts Powered by Azure
    • Marked as answer by Yi-Lun Luo Friday, December 24, 2010 9:04 AM
    Sunday, December 19, 2010 10:04 AM

All replies

  • Hi,

    If you are hosting in IIS 7.0 or 7.5 you can get WCF call execution statistics using Windows Server AppFabric.

    http://msdn.microsoft.com/en-us/windowsserver/ee695849

    AppFabric is included in the Windows licence, and uses Event Tracing for Windows (ETW) to track service execution statistics to a database. As long as your WCF code is compiled with a .NET 4 compiler, tracking will require no code changes.

    AppFabric woll not track the execution time of every call for performance reasons. It will aggregate the average execution over a 10 second window for each service method. The statistics can be queried from the AppFabric Dashboard in IIS manager, or a custom interface.

    This may be a good way to get the statistics you need.

    Regards,

    Alan

     


    http://www.CloudCasts.net - Community Webcasts Powered by Azure
    • Marked as answer by Yi-Lun Luo Friday, December 24, 2010 9:04 AM
    Sunday, December 19, 2010 10:04 AM
  • Hi Alan,

    I am using appfabric to monitor my wcf services, can you explain me the "call duration" in the events tab?

    Is this the duration to execute only the operation? or is this the time taken to enter IIS and then return back from IIS?


    Saturday, April 21, 2012 5:47 AM