AppDynamics Application Intelligence Platform

3.9.x Documentation

PDFs

Learn by Watching

Doc Maps

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Once you have instrumented your Android application with the Mobile Android SDK, you can also use the APIs exposed by the SDK to customize the data for your app that appears in the Controller UI, under the Custom Data tab.  

Download the JavaDocs

A complete zipped version of the JavaDocs for the SDK can be downloaded from here.

The Instrumentation class contains the methods that are of interest.

Extend the Mobile Agent

You can use methods available in the Instrumentation class to collect three additional types of data.

Anchor
InfoPoints
InfoPoints
Info Points

Information points allow you to track how your own code is running.  You can see how often a single method is invoked, and how long it takes to run, using  beginCall and endCall. For example, to collect information on your downloadImage method, you could use code similar to this:

...

Code Block
@InfoPoint
 public void infoPointMethod(String arg1, int arg2, long value) {
   System.out.println("Executing infoPointMethod!");
 }
 

Anchor
CustomTimer
CustomTimer
Custom Timers

Custom timers allow you to time any arbitrary sequence of events within your code, even spanning multiple methods, by using startTimer and stopTimer.

...

(info) startTimer(String) and stopTime(String) can be called from different threads.

Anchor
CustomMetric
CustomMetric
Custom Metrics

Any integer-based data can be passed to the agent.  The first parameter to the report.Metric call is the name you want the metric to appear under in the Controller UI. For example, to track the number of times your users click the checkout button in your UI, you could use code similar to this.

Code Block
findViewById(R.id.checkout_button).setOnClickListener(new View.OnClickListener(){
      @Override
      public void onClick(View view){
          //run your checkout routine.
          Instrumentation.reportMetric("Checkout Count", 1);
      }
 });

Set Up the Agent for an On-Premise EUEM Processor

By default the agent is configured to send its beacons to the EUEM Cloud, which is an instance of the EUEM Processor running on AWS.  If you wish to instrument your app in an environment that is using an on-prem version of the Processor, you need to modify the URL to which the agent sends its data.  You do this using the second version of the start method listed in the JavaDocs, using the collectorURL parameter.

...