0

I've configured a WCF web service (.NET 3.5) to monitor counters using sitescope. This creates a warning when the main service call exceeds some predefined threshold.

I'm trying to figure out the best way to log the service with greater granularity. By this I mean I need some way to save the timing of each of the calls within the web service to see what may be causing a problem.

One way of doing this is to use log4net to log the timing of each call (e.g. database) that is used in the web service. Or maybe I should output the timing to a database? Whatever the solution I don't want it to greatly affect the timing of the web service itself.

Has anyone had to implement a similar solution? How should I design it so it only log/saves a sample of detailed web service calls rather than every call?

Thanks for your time.

AstroCB
  • 12,337
  • 20
  • 57
  • 73
CorribView
  • 711
  • 1
  • 19
  • 44
  • Posting this as a comment, as I haven't tried it myself: the ServiceModelEx library (by Juval Lowy, author of [Programming WCF Services](http://shop.oreilly.com/product/9780596521325.do)) contains a [Enterprise Services Logbook library](http://www.idesign.net/Downloads) that may be suitable for your case. See also [this SO question](http://stackoverflow.com/q/328485/419956). – Jeroen Sep 03 '12 at 11:54
  • Thanks for the info, will look into the ServiceModelEx as a possible solution. – CorribView Sep 03 '12 at 13:55

0 Answers0