Patent ID: 8479052

Claim:
A computer program product for implementing a computer implemented method for instrumenting performance counters in a .NET application, the computer program product comprising one or more non-transitory computer-readable storage devices having encoded thereon computer executable instructions which, when executed upon one or more processors within a computing system, perform the method for instrumenting performance counters in a .NET application, the method comprising: loading an instrumentation configuration to determine one or more .NET application methods requiring performance counter instrumentation and one or more types of performance counter that are to be instrumented for each such .NET application method; locating a segment of Common Intermediate Language method body that is to be instrumented with said one or more types of performance counter; and modifying the segment of Common Intermediate Language method body to expose one or more types of performance counter, wherein said modifying step further comprises: inserting declarative instrumentation filtering code into said Common Intermediate Language method body, said declarative instrumentation filtering code comprising computer executable instructions configured to: retrieve values from application method runtime parameters and class member variables; calculate filtering expressions; and determine if a method runtime context matches a filtering rule set associated with said one or more types of performance counters that are to be instrumented.