AppDynamics Application Intelligence Platform
3.9.x Documentation
...
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.
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.
You can use methods available in the Instrumentation class to collect three additional types of data.
Anchor | ||||
---|---|---|---|---|
|
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 | ||||
---|---|---|---|---|
|
Custom timers allow you to time any arbitrary sequence of events within your code, even spanning multiple methods, by using startTimer
and stopTimer
.
...
startTimer(String)
and stopTime(String)
can be called from different threads.
Anchor | ||||
---|---|---|---|---|
|
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); } }); |
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.
...