# Custom instrumentation using Web Client By default, APM Insight agent captures all your application transactions, known classes and methods, and web frameworks. In certain cases, methods or frameworks, apart from the default ones, are not captured, so as to minimize the agent overload on the application. To view all your methods and frameworks and to obtain granularity in your debugging process, you can instrument your custom methods or frameworks - this process, is called as Custom instrumentation. ### Uses of Custom instrumentation Custom instrumentation can be of great help for the following scenarios: - When you want to obtain 100% visibility into all your application methods and frameworks. - When you see an 'Uninstrumented block of code' while checking transaction traces. In such cases, you can instrument the method or class, that was not picked by the agent to check its performance. - When the framework is not supported or instrumented by default. For the above mentioned circumstances, you can deploy custom instrumentation. **Note:** This method is supported **only for Java and .NET Core agents**. You can custom instrument your [Ruby](https://www.manageengine.com/products/applications_manager/help/apm-insight-ruby-agent-custom-instrumentation-and-exception-tracking.html) and [Node.js](https://www.manageengine.com/products/applications_manager/help/apm-insight-nodejs-agent-custom-instrumentation.html) applications via agent APIs. Also, these configurations are specific to APM Insight applications and this will be applied across all instances. For instance specific custom instrumentation, you can use [Java agent API](https://www.manageengine.com/products/applications_manager/help/apm-insight-java-agent-custom-instrumentation-using-java-annotations.html) or [.NET agent API](https://www.manageengine.com/products/applications_manager/help/apminsight-dotnet-agent.html#dotNET), depending upon your application platform. ## How to custom instrument methods, classes, or frameworks? Follow the steps given below to perform custom instrumentation: 1. Log in to Applications Manager web client. 2. Go to **APM** tab → **Your application** → **Edit APM Insight Application Associates**. 3. Enter the following lines of code mentioned below as input in the textbox. You can enter the input either in **Text** or **JSON format**. The format for both types are given below: ### JSON format type: **Format:** ```json {"Fully qualified ClassName":{"MethodName1" : "ComponentName", "MethodName2" : "ComponentName" }} ``` **Example:** ```json { "com.sample.web.tasks.ModelUpdateHandler": { "doHandle": "MODEL_UPDATE", "update": "MODEL_UPDATE" } } ``` ### Text format type: **Format:** ```text Fully qualified ClassName : methodNames separated by comma(,) : Component Name ``` **Example:** ```text com.sample.web.tasks.ModelUpdateHandler : doHandle,update : MODEL_UPDATE com.sample.web.services.SystemCheck : doCheck, isHealthy : com.sample.web.store.DataModifier : : MODIFIER com.sample.web.utils.FileUtils : : ``` **Note:** For both JSON and Text type, use the below format for specifying the fully qualified classname: **Java classes format** - *com/appmanager/apminsight/agent/JavaAgent* **.NET Core classes format** - *Com.Appmanager.Apminsight.Agent.DotAgent* 4. After entering the above lines, click **Save**. ![Applications Manger APM Insight Custom Instrumentation using Web Client: Instrumentation of custom methods, classes, and frameworks](https://www.manageengine.com/products/applications_manager/help/images/configuring-custom-instrumentation.png) ### Before and after custom instrumentation #### Java agent **Before:** ![](https://cdn.manageengine.com/sites/meweb/images/applications_manager/help/java-agent-before-custom-instrumentation.png) **After:** ![](https://cdn.manageengine.com/sites/meweb/images/applications_manager/help/java-agent-after-custom-instrumentation.png)