Disabling attribute based Entlib performance counters

Topics: General discussion, Policy Injection Application Block
Sep 2, 2010 at 2:18 AM


I'm using attribute based entlib performance counters


[PerformanceCounterCallHandler("category-name", "instance-name")]
public void Deposit(decimal depositAmount) { balance += depositAmount; }

I thought I could disable all attribute based performance counters in my applilcation using the below config section. However below doesn't seems to have any effect on the counters.

<instrumentationConfiguration performanceCountersEnabled="false" eventLoggingEnabled="false" wmiEnabled="false" applicationInstanceName="MyApp" />

 Can you please let us know any suggesions on how to disable  attr. based performance counters using config?

Sep 2, 2010 at 10:17 AM

I'm still researching how this will be done. I'll update you if I got any.

Gino Terrado
Global Technology and Solutions
Avanade, Inc.

Sep 3, 2010 at 7:05 AM

I inspect the source code just and found no flag that will disable the execution of the performance counter call handler.  As a workaround, you can disable incrementing the counters by setting all its Increment* properties to false. 


Sarah Urmeneta
Global Technology and Solutions
Avanade, Inc.