Showing results for 
Show  only  | Search instead for 
Did you mean: 

how to instrument an android native app


hai guys,

anybody can help me how to instrument an android native app, because the customer do not want to use auto instrumentation. so we need to instrument an APK with manually instrumentation.

thank for help


Dynatrace Champion
Dynatrace Champion

Can you explain why they don't want to use the autoinstrumenter?

because after we do an auto instrument, there are some functions that don't work. so the customer suggest use manual instrumentation.

Dynatrace Pro
Dynatrace Pro

Official documentation for manual instrumentation

You can also use the 7.2 SDK, because the 7.2 agent is able to communicate with a 7.0 AppMon server.

so, i must make sure the application use the 7.2 SDK first, before i do an manual instrument?

Yes, you have add the SDK first. You have to perform these three steps for manual instrumentation.

In the first step you have to add the SDK as dependency to your app:

dependencies {
implementation 'com.dynatrace.agent:agent-android:<version>'

In the second step you have to start the agent:

public class MyApplication extends Application {

public void onCreate() {
Dynatrace.startup(this, new AppMonConfigurationBuilder("YourAppId", "")

In the third step you have to manually instrument the parts of your app that you are interested in. Therefore you have to use the API methods from the SDK.

In the documentation each step is explained in more detail.

if the application use the 7.1 SDK, should it be updated to 7.2 SDK or can be use same method for 7.1 SDK?

I don't understand your question. How can the application contain the 7.1 SDK, if it is not instrumented?

You can't include the same library twice. The API between the 7.2 and 7.1 SDK is slightly different. Also some features from the 7.2 SDK may not be available in the 7.1 version

okey i understand, thanks for your help, tomorrow i will try for manual instrimetation.

Dynatrace Champion
Dynatrace Champion

There is also the option of combining automated and manual instrumentation. So you'd still perform the automated steps, but also sprinkle manual instrumentation where you want additional details or where the autoinstrumentation does not pick up certain app activity that you desire to capture.