Skip to main content

dawdler-pinpoint-plug

Module introduction​

The Pinpoint distributed tracing plugin. After upgrading to 3.1.0 there is no longer any need to handle the Tomcat plugin separately, and pinpoint-tomcat10-plugin is no longer maintained.

Tracing is supported for the gateway module (dawdler-web-gateway): the gateway entry server span (DAWDLER_GATEWAY) plus the proxy span for forwarding upstream (DAWDLER_GATEWAY_PROXY). Both forwarding paths, HTTP proxy and WebSocket proxy, are covered. Tracing state is passed across threads (servlet thread → Vert.x event loop/executor thread) via request attributes, and the asynchronous final-state recording semantics are consistent with the asynchronous mode of the official Tomcat plugin.

Gateway tracing configuration​

# Gateway tracing switch, true by default; set to false to keep only RPC-layer tracing in the gateway process
profiler.dawdler.gateway.enable=true

No additional configuration is needed on the gateway side: when the plugin detects gateway classes (GatewayFilter, etc.) in the process, it automatically installs the interceptor; it strips Pinpoint-* request headers forged by clients and then injects tracing headers according to the real sampling state, so external requests cannot forge traces. Upstream services continue the trace as long as the pinpoint agent is attached, whether or not they are dawdler services (for example, an ordinary web application deployed on Tomcat).

1. Download the Pinpoint resources​

Download the pinpoint agent distribution

pinpoint-agent-3.1.0.tar.gz

Download the two jars, the collector and the web-ui respectively.

For hbase1.x, download:

pinpoint-collector-boot-3.1.0.jar

pinpoint-web-boot-3.1.0.jar

For hbase2.x, download:

pinpoint-hbase2-collector-boot-3.1.0.jar

pinpoint-hbase2-web-boot-3.1.0.jar

2. Download hbase1.x or hbase2.x​

hbase-1.7.1-bin.tar.gz

hbase-2.4.12-bin.tar.gz

3. Add the plugin to the collector and web-ui jars​

3.1 Download pinpoint-dawdler-plugin​

pinpoint-dawdler-plugin this package is the built dawdler-pinpoint-plug plugin.

3.2 hbase1 version​

Add the dawdler plugin downloaded in 3.1 to pinpoint-web-boot-3.1.0.jar and pinpoint-collector-boot-3.1.0.jar

#Create BOOT-INF/lib/

mkdir -p BOOT-INF/lib/

cp pinpoint-dawdler-plugin-3.1.0.jar BOOT-INF/lib/

# tomcat10 needs this jar; skip this step if you use tomcat9 or earlier
# pinpoint-tomcat-plugin-3.1.0.jar must be obtained from the pinpoint release package
cp pinpoint-tomcat-plugin-3.1.0.jar BOOT-INF/lib/

#Add the plugin to pinpoint-web-boot-3.1.0.jar
jar -uvf0 pinpoint-web-boot-3.1.0.jar BOOT-INF/lib

#If using zip, use
zip -r0 pinpoint-web-boot-3.1.0.jar BOOT-INF/lib

#Add the plugin to pinpoint-collector-boot-3.1.0.jar
jar -uvf0 pinpoint-collector-boot-3.1.0.jar BOOT-INF/lib

#If using zip, use
zip -r0 pinpoint-collector-boot-3.1.0.jar BOOT-INF/lib

3.3 hbase2 version​

Add the built dawdler plugin to pinpoint-hbase2-web-boot-3.1.0.jar and pinpoint-hbase2-collector-boot-3.1.0.jar

#Create BOOT-INF/lib/

mkdir -p BOOT-INF/lib/

cp pinpoint-dawdler-plugin-3.1.0.jar BOOT-INF/lib/

# tomcat10 needs this jar; skip this step if you use tomcat9 or earlier
# pinpoint-tomcat-plugin-3.1.0.jar must be obtained from the pinpoint release package
cp pinpoint-tomcat-plugin-3.1.0.jar BOOT-INF/lib/

#Add the plugin to pinpoint-hbase2-web-boot-3.1.0.jar
jar -uvf0 pinpoint-hbase2-web-boot-3.1.0.jar BOOT-INF/lib

#If using zip, use
zip -r0 pinpoint-hbase2-web-boot-3.1.0.jar BOOT-INF/lib

#Add the plugin to pinpoint-hbase2-collector-boot-3.1.0.jar
jar -uvf0 pinpoint-hbase2-collector-boot-3.1.0.jar BOOT-INF/lib

#If using zip, use
zip -r0 pinpoint-hbase2-collector-boot-3.1.0.jar BOOT-INF/lib

3.4 Add the logos (optional; if not added, only the logos are not shown)​

Add DAWDLER.png, DAWDLER_CONSUMER.png, and DAWDLER_PROVIDER.png to pinpoint-web-boot-3.1.0.jar or pinpoint-hbase2-web-boot-3.1.0.jar

In pinpoint-web-boot-3.1.0.jar the locations are META-INF/resources/img/icons and META-INF/resources/img/servermap

In pinpoint-hbase2-web-boot-3.1.0.jar the locations are META-INF/resources/img/icons and META-INF/resources/img/servermap inside /lib/pinpoint-web-3.1.0.jar

Add them via jar -uvf0 or zip -r0

4. Configure the startup scripts for dawdler and tomcat​

pinpoint runs as a javaagent, so the related startup parameters need to be configured. The specific steps are given below.

Extract the downloaded pinpoint-agent-3.1.0 to obtain the pinpoint-agent-3.1.0 directory.

Put pinpoint-dawdler-plugin-3.1.0.jar under pinpoint-agent-3.1.0/plugin.

Edit pinpoint-agent-3.1.0/profiles/release/pinpoint.config

For the dawdler-jdk25 version, add:

###########################################################
# DAWDLER #
###########################################################
profiler.dawdler.enable=true
# Classes for detecting application server type. Comma separated list of fully qualified class names. Wildcard not supported.
profiler.dawdler.bootstrap.main=dawdler.server/club.dawdler.server.bootstrap.Bootstrap

Copy the configured pinpoint-agent-3.1.0 to the bin directories of tomcat and dawdler respectively.

Edit the tomcat startup script


JAVA_OPTS="-javaagent:pinpoint-agent-3.1.0/pinpoint-bootstrap.jar -Dpinpoint.config=pinpoint-agent-3.1.0/pinpoint-root.config -Dpinpoint.agentId=user-api-01 -Dpinpoint.applicationName=user-api";

Edit the dawdler startup script


vm_arguments="-javaagent:pinpoint-agent-3.1.0/pinpoint-bootstrap.jar -Dpinpoint.config=pinpoint-agent-3.1.0/pinpoint-root.config -Dpinpoint.agentId=user-service-01 -Dpinpoint.applicationName=user-service -Dpinpoint.agentName=user-service";

5. Start hbase, the pinpoint collector, web-ui, dawdler, and tomcat​

Start hbase (please resolve any port issues yourself; if you need an hbase/zookeeper cluster, set it up yourself)


sh start-hbase.sh

After startup, run the initialization scripts for details

Start the collector


/usr/lib/jvm/java-11-openjdk-11.0.15.0.10-1.fc36.x86_64/bin/java -jar -Dpinpoint.zookeeper.address=127.0.0.1 pinpoint-hbase2-collector-boot-3.1.0.jar

Start the web console (web-ui)


/usr/lib/jvm/java-11-openjdk-11.0.15.0.10-1.fc36.x86_64/bin/java -jar -Dpinpoint.zookeeper.address=127.0.0.1 pinpoint-hbase2-web-boot-3.1.0.jar

Start dawdler


sh dawdler.sh start

Start tomcat


sh catalina.sh start