question

Shandi P. avatar image
Shandi P. asked ·

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

configuration7.0appmon 7mobile monitoringandroid
10 |2000000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

Thomas W. avatar image
Thomas W. answered ·

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.

5 comments Share
10 |2000000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

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

0 Likes 0 · ·

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 {

    @Override
    public void onCreate() {
        super.onCreate();
        Dynatrace.startup(this, new AppMonConfigurationBuilder("YourAppId", "http://myhost.mydomain.com")
            .buildConfiguration());
    }
}

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.

0 Likes 0 · ·

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?

0 Likes 0 · ·

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

0 Likes 0 · ·

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

0 Likes 0 · ·
Joe H. avatar image
Joe H. answered ·

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.

Share
10 |2000000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

Joe H. avatar image
Joe H. answered ·

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

1 comment Share
10 |2000000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

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

0 Likes 0 · ·