You need to enable JavaScript to run this app.
Application Performance Management Plus

Application Performance Management Plus

Copy page
Download PDF
Integration guide
Java application integration
Copy page
Download PDF
Java application integration
Java applications have different integration Methods in different scenarios. This article describes detailed integration Actions for Java applications in various scenarios. After integration, you can automatically collect trace information, automatically generate metric, as well as perform trace search, log search, and other features.​
Integration via OpenTelemetry (recommended)​
OpenTelemetry is an observability project under CNCF, designed to provide standardized solutions in the observability field. It addresses the standardization of data models, collection, processing, and export of observability data, and offers services independent of third-party vendors.​
If your application has already integrated the OpenTelemetry SDK, the APMPlus server side can receive data reported by OpenTelemetry. After integrating with APMPlus, you will gain capabilities such as RED metric generation, multidimensional trace search, single trace search, topology generation, and more.​
tip​
To isolate production and test data, see Isolate production and test data.​
Limits​
  • There are certain limits when converting OpenTelemetry Metrics to Prometheus Metrics:​
  • Data with aggregation method set to delta is not supported. Do not modify the default aggregation configuration on the SDK side. Ensure that the aggregation method on the SDK side is cumulative.​
  • Each workspace has its own data reporting credentials. To manage and isolate data using workspaces, ensure that the apmplus-opentelemetry-collector component has been upgraded to version v3.1.0 or above.​
Data reporting​
Method 1: Report directly to the ApmPlus server side​
Observable data is reported directly to the ApmPlus server side, supporting data reporting via grpc, http/protobuf, and other Methods.​
Method 2: Otel Collector forwarding​
APMPlusOpenTelemetryCollector is a data collector developed by APMPlus based on OpenTelemetryCollector. You can install the Opentelemetry Collector in the cluster for data forwarding. There are two installation Methods:​
  • Install the apmplus-opentelemetry-collector component via the VKE cluster component center using the graphical installation interface. In addition, it is recommended to install the apmplus-server-agent component at the same time to enable metric data collection at the host and process levels.​
  • Manually install using the script provided on the service integration page.​
Data Integration​
Method 1: SDK integration​
To report data using manual instrumentation with the community-provided Opentelemetry Java SDK, refer to the community's java demo. After building the Java project, specify the backend for data reporting and authentication parameters in the start command:​
  • To report data directly to the ApmPlus server side:​
  • ​
    java -jar myapp.jar \​
    -Dotel.exporter.otlp.endpoint=<Apmplus_endpoint> \​
    -Dotel.service.name=myapp \​
    -Dotel.exporter.otlp.protocol=<protocol> \​
    -Dotel.exporter.otlp.headers=X-ByteAPM-AppKey=<app_key>​
    ​
  • To report data to Collector, otel.exporter.otlp.headers does not need to be specified.​
  • ​
    java -jar myapp.jar \​
    -Dotel.exporter.otlp.endpoint=<collector_endpoint> \​
    -Dotel.service.name=myapp \​
    -Dotel.exporter.otlp.protocol=<protocol>​
    ​
tip​
<service_name> Enter the application service name.​
Enter the server side address for your environment.​
<app_key> Enter the app_key provided by the service access console. The app_key for each workspace is different. To obtain it, see: How to obtain the authentication information AppKey for performance monitoring?.​
Enter the protocol used for data reporting. grpc and http/protobuf are supported.​
Method 2: Probe integration​
The Opentelemetry javaagent uses JVM bytecode enhancement technology to enable collection and automatic reporting of otel data for various popular Java frameworks. There are two specific usage methods:​
  1. Manual download of Javaagent​
  • The service access page provides the latest download method for Javaagent. Modify the start command when starting the application to inject the Javaagent:​
  • To report data directly to the ApmPlus server side:​
  • ​
    java -javaagent:/path/to/opentelemetry-javaagent.jar \​
    -Dotel.exporter.otlp.endpoint=<Apmplus_endpoint> \​
    -Dotel.service.name=myapp \​
    -Dotel.exporter.otlp.protocol=<protocol> \​
    -Dotel.exporter.otlp.headers=X-ByteAPM-AppKey=<app_key> \​
    -jar myapp.jar​
    ​
  • To report data to Collector, otel.exporter.otlp.headers does not need to be specified.​
  • ​
    java -javaagent:/path/to/opentelemetry-javaagent.jar \​
    -Dotel.exporter.otlp.endpoint=<collector_endpoint> \​
    -Dotel.service.name=myapp \​
    -Dotel.exporter.otlp.protocol=<protocol> \​
    -jar myapp.jar​
    ​
  1. Automatic injection via Opentelemetry Operator​
  • In k8s scenarios, Operator-based automatic injection of Javaagent into business POD containers is provided. You need to deploy the apmplus-opentelemetry-collector component in the cluster component center in advance.​
  • After deployment, modify the business workload (currently supports deployment and statefulset) to add the instrumentation.apmplus.volcengine.com/inject-java and instrumentation.apmplus.volcengine.com/workspace annotations.​
  • Method 1: Manual modification example:​
​
apiVersion: apps/v1​
kind: Deployment​
metadata:​
name: simple-java​
labels:​
app: simple-java​
spec:​
replicas: 1​
selector:​
matchLabels:​
app: simple-java​
template:​
metadata:​
labels:​
app: simple-java​
annotations:​
instrumentation.apmplus.volcengine.com/inject-java: 'true' # Turn on APMPlus observation injection​
instrumentation.apmplus.volcengine.com/workspace: default Specify the workspace for the service​
spec:​
containers:​
- name: simple-java​
image: java_demo_simple​
imagePullPolicy: Always​
env:​
- name: CONTAINER_RUNTIME​
value: "k8s"​
​
Method 2: vke blank screen modification example, update the workload​
After modification, restart the business POD.​
Integration via Jaeger​
Jaeger is an open-source distributed tracing system developed by Uber.​
For existing systems already integrated with Jaeger, Jaeger trace data can be reported to APMPlus to achieve comprehensive trace monitoring capabilities.​
After integrating with APMPlus, you will gain capabilities such as RED metric generation, multidimensional trace search, single trace search, topology generation, and more.​
JaegerAgent integration​
The SDK reports data to the Agent, and the Agent reports data to the APMPlus server side.​
  1. Configure the application and enable data collection.​
  • Refer to the Jaeger documentation to send trace data to the Agent via UDP.​
  1. Configure the Agent and modify the reporting endpoint.​
  1. Modify the jaeger-agent start parameters. The configuration is as follows:​
  • ​
    ./jaeger-agent --reporter.grpc.host-port=apmplus-{region}.ivolces.com:4317 \ ​
    --reporter.grpc.tls.enabled=false \ ​
    --agent.tags=app_key={appkey}​
    ​
tip​
For the complete configuration command, view it in the Access Center. For details, see How to use the Access Center?.​
  1. Restart the application.​
SDK direct reporting​
The SDK performs data collection and reports directly to the APMPlus server side.​
  1. Configure the application and turn on data collection.​
  • The following is sample code for configuring the reporter via the public network:​
  • ​
    io.jaegertracing.Configuration.SenderConfiguration sender = new io.jaegertracing.Configuration.SenderConfiguration(); ​
    sender.withEndpoint("https://apmplus-{region}.volces.com/server_collect/third_party/jaeger/v2/{appkey}/api/trace")​
    ​
  • Sample code for configuring the reporter via the private network is as follows:​
  • ​
    io.jaegertracing.Configuration.SenderConfiguration sender = new io.jaegertracing.Configuration.SenderConfiguration(); ​
    sender.withEndpoint("http://apmplus-{region}.ivolces.com/server_collect/third_party/jaeger/v2/{appkey}/api/trace")​
    ​
tip​
For the complete configuration command, view it in the Access Center. For details, see How to use the Access Center?.​
  1. Restart the application.​
Integration via Zipkin​
Zipkin is an open-source distributed tracing system from Twitter. Zipkin helps you collect trace data.​
For systems that have already integrated Zipkin, existing trace data can be reported to APMPlus to achieve comprehensive full-link monitoring capability.​
After integrating with APMPlus, you will gain RED method generation, multidimensional trace search, single trace search, topology map generation, and many other APMPlus capabilities.​
SDK direct reporting​
The SDK performs data collection and reports directly to the APMPlus server side.​
  1. Configure the application and turn on data reporting.​
  • The following is an example for obtaining the zipkin reporting endpoint via the public network.​
  • ​
    https://apmplus-{region}.volces.com/server_collect/third_party/zipkin/v2/{appkey}/api/v2/spans​
    ​
  • The following is an example for obtaining the zipkin reporting endpoint via the private network.​
  • ​
    http://apmplus-{region}.ivolces.com/server_collect/third_party/zipkin/v2/{appkey}/api/v2/spans​
    ​
tip​
For the complete configuration command, view it in the Access Center. For details, see How to use the Access Center?.​
  1. Integrate the service and configure the reporting endpoint. For specifics, see zipkin sample code.​
  1. Restart the application.​
Integration via SkyWalking​
SkyWalking Agent performs data collection and reports directly to the APMPlus server side. Currently, integration of SkyWalking Trace, Meter, Log, JVM, and CLR data is supported.​
SDK direct reporting​
  1. Configure the application and turn on data reporting.​
  1. Configure the SkyWalking grpc reporting endpoint, set the authentication user identifier, and specify the service name. For specifics, see SkyWalking Documentation.​
  1. Run the following command to start the service and SkyWalking Agent.​
  • ​
    java -javaagent:path/to/skywalking-agent.jar​
    -Dskywalking.collector.backend_service=apmplus-{region}.ivolces.com:4317​
    -Dskywalking.agent.authentication={appkey}​
    -Dskywalking.agent.service_name={YOUR_SERVICE_NAME}​
    -jar YOUR_SERVICE.jar​
    ​
  1. Restart the application.​
  1. Verify data reporting.​
  • After trace integration, you can view the topology map, Trace Analysis, service details, and other data.​
  • After meter integration, you can view data points among custom metrics.​
  • After log integration, you can view logs.​
  • After JVM and CLR integration, you can view metrics such as "skywalking_jvm_*" and "skywalking_clr_*" among custom metrics.​
​
Last updated: 2026.06.09 16:53:29