c# - Is it possible to track all outgoing WCF call? -
our application calls external services like
//in client factory fooserviceclient client = new fooserviceclient(binding, endpointaddress); //in application code client.barmethod(); //or other methods
is possible track of these calls (e.g events or that) application can collect statistics number of call, response time, etc? note application needs access values, not write log file.
what can think create subclass of visualstudio-generated fooserviceclient , add codes this
override void barmethod() { raisestart("barmethod"); base.barmethod(); raiseend("barmethod); }
and raisestart , raiseend method raise events listened code.
but seems tedious (because there lot of methods override) , there lot of repeated codes, code needs change everytime service contract changes, etc. there simpler way achieve this, example using reflection create subclass or tapping built-in method in wcf, if any?
the first thing @ see if counters available in server's performance monitor can provide kind of feedback need. there's built in counters variety of metrics servicemodel endpoints, operations , services. here more info http://msdn.microsoft.com/en-us/library/ms735098.aspx
Comments
Post a Comment