This topic describes how to import trace data from Java applications to Application Real-Time Monitoring Service (ARMS) by using OpenTelemetry.
Use OpenTelemetry to import trace data from Java applications
You can use multiple methods to import trace data from Java applications to Application Real-Time Monitoring Service (ARMS) with OpenTelemetry. You can directly import trace data from OpenTelemetry or use OpenTelemetry Collector to forward trace data to ARMS.
Directly import trace data from OpenTelemetry
- Use the ARMS agent for Java applications
To import trace data from Java applications to ARMS, we recommend that you install the ARMS agent for Java applications. The ARMS agent for Java applications is an out-of-the-box solution for automatically reporting trace data. The agent contains a large number of instrumentation libraries for common components. For more information, see Monitor Java applications.
- Use the ARMS agent for Java applications and the OpenTelemetry SDK for Java
The ARMS agent for Java applications V188.8.131.52 and later support OpenTelemetry SDK for Java extensions. You can use the ARMS agent for Java applications to automatically obtain the trace data of common components and use the OpenTelemetry SDK for Java to instrument custom methods. For more information, see Use OpenTelemetry SDK for Java to manually instrument an application.
- Use the OpenTelemetry SDK for Java and a Jaeger exporter
You can use the OpenTelemetry SDK for Java to instrument your application and then use a Jaeger exporter to report trace data. For more information, see Use OpenTelemetry to submit the trace data of Java applications.
Forward trace data to ARMS by using OpenTelemetry Collector
Forward trace data to ARMS by using ARMS for OpenTelemetry Collector
You can install ARMS for OpenTelemetry Collector in a Container Service for Kubernetes (ACK) cluster and use the collector to forward trace data. ARMS for OpenTelemetry Collector provides a variety of easy-to-use and reliable functions, including lossless statistics, dynamic parameter tuning, application state management, and out-of-the-box tracing dashboards on Grafana. The lossless statistics function helps you pre-aggregate metrics on your machine, which negates the effect of sampling rate during statistics collection.
The following section describes the procedure of installing ARMS for OpenTelemetry Collector:
- Install ARMS for OpenTelemetry Collector by using the application catalog in the ACK
- Log on to the ACK console. In the left-side navigation pane, click Clusters.
- On the Clusters page, click the name of a cluster. In the left-side navigation pane of the page that appears, choose .
- On the Cluster Topology page, click Install. ACK automatically installs the Kubernetes Monitoring agent ack-arms-cmonitor.Note The default namespace is arms-prom.
- In the left-side navigation pane, choose arms-prom. . At the top of the page, set Namespace to
- Click cmonitor-agent. On the Access Method tab, click otel-collector-service. If multiple receiver ports are exposed to receive OpenTelemetry data, it indicates the ack-arms-cmonitor component was installed. The following figure shows an otel-collector-service that is running as expected.
- Change the exporter endpoint in the SDK of your application to
Forward trace data by using the open source OpenTelemetry Collector
To use the open source OpenTelemetry Collector to forward trace data to ARMS, you only need to modify the endpoint and token of the exporter.
exporters: otlp: endpoint: <endpoint>:8090 tls: insecure: true headers: Authentication: <token>
<endpoint>with the endpoint of the exporter. Example:
<token>with the token obtained in the ACK console. Example:
Use trace data
ARMS provides a variety of diagnostic features, such as trace details query, pre-aggregated metric dashboards, post-aggregated metric analysis of Trace Explorer, and access to the logs of trace-associated services, which ensures that trace data is used effectively.
- Trace details
You can view the interface call order and duration of the trace on the left side of the trace details page and view additional information and associated metrics, such as SQL, JVM, and host metrics, on the right side of the trace details page.
- Pre-aggregated metric dashboards
ARMS provides multiple pre-aggregated metric dashboards based on trace data. The dashboards include an application overview dashboard, API call dashboard, and database query dashboard. For more information, see View the key performance metrics and topology of an application.
- Post-aggregated metric analysis of Trace Explorer
ARMS provides multi-dimensional filtering and post-aggregated metric analysis features, such as querying the abnormal traces of applications. These features are helpful for debugging applications. ARMS also helps you aggregate trace data by IP address or API. For more information, see Trace Explorer.
- Access to the logs of trace-associated services
ARMS associates traces with service logs to help you troubleshoot exceptions by calling APIs. For more information, see Identify business exceptions by analyzing traces and logs.