After you install an agent for an application, Cloud Monitor 2.0 starts to monitor the application. On the Exception Analysis page, filter and analyze exceptions by exception name, interface name, and host for code optimization.
Scenarios
ARMS records exceptions only if they propagate outside try-catch blocks. Assume the ARMS agent has instrumented public void methodA and public void methodB, which call each other:
Scenario 1: Both methods catch exceptions.
public int methodA() { try { return methodB(); } catch (Throwable e) { e.printStackTrace(); return 0; } } public int methodB() { try { return 1 / 0; } catch (Throwable e) { e.printStackTrace(); return 0; } }Result: ARMS records no exceptions because they are caught and handled within the
try-catchblocks.Scenario 2: methodA catches an exception, whereas methodB returns one.
public int methodA() { try { return methodB(); } catch (Throwable e) { e.printStackTrace(); return 0; } } public int methodB() { return 1 / 0; }Result: ARMS records one
java.lang.ArithmeticExceptionexception (uncaught inmethodB).Scenario 3: Both methods return exceptions.
public int methodA() { return methodB(); } public int methodB() { return 1 / 0; }Result: ARMS records two
java.lang.ArithmeticExceptionexceptions.Scenario 4: methodA catches methodB’s exception and rethrows it as RuntimeException.
public static int methodA() { try { return methodB(); } catch (Throwable e) { throw new RuntimeException(e); } } public static int methodB() { return 1 / 0; }Result: ARMS records one
java.lang.ArithmeticExceptionexception (uncaught inmethodB) and onejava.lang.RuntimeExceptionexception (thrown bymethodA).
Prerequisite
An agent is installed for the application.
Try in Playground
Alibaba Cloud Playground provides a demo environment where you can experience the main features of Cloud Monitor 2.0.
Visit the Playground demo environment. By default, you are logged on to the
o11y-demo-cn-hangzhouworkspace.In the left navigation pane, choose .
View in console
Log on to the Cloud Monitor 2.0 console, and select a workspace. In the left navigation pane, choose .
On the Applications page, click an application. Then, choose .
In the Quick Filter section, filter the number of exceptions and the exception list by exception name, interface name, application, and instance.
In the trend charts section, view the number of exceptions that occurred in a specified time period, with each bar in the chart being stacked by exception name.
The exception list shows information such as the name of the abnormal interface, number of exceptions, proportion, and exception summary.
In the Actions column, you can:
Click Overview to view information such as the exception count trend, exception distribution by interface and instance, and exception stack in the panel that appears.
Click Traces to view trace details.