Deploying Pinpoint for Distributed Tracing of Dubbo Services
This guide explains how to install, configure, and use the open‑source Pinpoint APM tool to monitor Java‑based Dubbo applications, covering environment preparation, downloading binaries, modifying configuration files, deploying collector and web components, installing agents, and adding startup parameters for both Tomcat and SpringBoot deployments.
When using Dubbo for service‑oriented architecture, it is often hard to determine which client caused an exception; a distributed tracing system such as Pinpoint can quickly locate the root cause.
What is Pinpoint – Pinpoint is an open‑source APM (Application Performance Management) tool for large‑scale Java distributed systems, inspired by Google Dapper. It visualizes module interactions, provides server maps, real‑time thread charts, request/response scatter charts, call stacks, and inspectors to analyze system topology and performance.
Supported Modules include JDK 6+, various servlet containers (Tomcat, Jetty, JBoss, etc.), Spring/Spring Boot, HTTP clients, Thrift, Dubbo, messaging systems (ActiveMQ, RabbitMQ), databases (MySQL, Oracle, PostgreSQL, etc.), caches (Redis, Cassandra), and logging frameworks.
Deployment Steps
Prepare a basic environment (Hadoop, HBase, Zookeeper) and ensure firewalls are disabled if necessary.
Download Pinpoint binaries from GitHub: wget https://github.com/naver/pinpoint/releases/download/1.7.3/pinpoint-agent-1.7.3.tar.gz wget https://github.com/naver/pinpoint/releases/download/1.7.3/pinpoint-collector-1.7.3.war wget https://github.com/naver/pinpoint/releases/download/1.7.3/pinpoint-web-1.7.3.war
Set up Zookeeper, HBase (single node), and JDK 1.8 (or OpenJDK).
In HBase, run ./hbase shell hbase-create.hbase to create required tables.
Prepare a Tomcat instance for deployment.
Deploy the two WAR files: rename pinpoint-web-1.7.3.war to ROOT.war and pinpoint-collector-1.7.3.war to collector.war , then place them in Tomcat’s webapps directory and start Tomcat.
Verify Tomcat logs for connection errors (e.g., port 2181).
Agent Installation
Extract pinpoint-agent-1.7.3.tar.gz and edit pinpoint.config to set profiler.collector.ip to the collector’s host.
Deploy the agent on every application server; Pinpoint adds only about 3% overhead.
Prepare a Dubbo Sample Project
Clone the sample repository: https://github.com/souyunku/spring-boot-examples/tree/master/spring-boot-dubbo
Update application.properties to point zookeeper.connect to your Zookeeper address.
Build the project with mvn clean package .
Configure Startup Parameters
For Tomcat, edit bin/catalina.sh and add:
CATALINA_OPTS="$CATALINA_OPTS -javaagent:$AGENT_PATH/pinpoint-bootstrap-1.7.3.jar"
CATALINA_OPTS="$CATALINA_OPTS -Dpinpoint.agentId=tomcat1"
CATALINA_OPTS="$CATALINA_OPTS -Dpinpoint.applicationName=webcontroller"For SpringBoot, start the JVM with:
java -javaagent:/opt/pinpoint-bootstrap-1.7.3.jar -Dpinpoint.agentId=dubbo-provider-1 -Dpinpoint.applicationName=dubbo-provider -jar dubbo-provider-1.0-SNAPSHOT.jar java -javaagent:/opt/pinpoint-bootstrap-1.7.3.jar -Dpinpoint.agentId=dubbo-consumer-1 -Dpinpoint.applicationName=dubbo-consumer -jar dubbo-consumer-1.0-SNAPSHOT.jarAfter launching the services, log into Pinpoint’s web UI to view cluster topology, request traces, and performance metrics such as CPU, memory, GC, TPS, and JVM parameters.
Testing
Send a request to the consumer, e.g., http://localhost:8080/sayHello?name=souyunku , and observe the trace details, server map, and bottleneck locations in the Pinpoint UI.
Several screenshots illustrate the Pinpoint dashboard, request details, and system metrics.
Architect's Tech Stack
Java backend, microservices, distributed systems, containerized programming, and more.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.