You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by me...@apache.org on 2021/02/26 03:38:17 UTC
[shardingsphere] branch master updated: init zipkin and jaeger
integration project (#9507)
This is an automated email from the ASF dual-hosted git repository.
menghaoran pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git
The following commit(s) were added to refs/heads/master by this push:
new e76ab76 init zipkin and jaeger integration project (#9507)
e76ab76 is described below
commit e76ab763ae4040c7bbe0c68e52c387b7d5171823
Author: xiaoyu <54...@qq.com>
AuthorDate: Fri Feb 26 11:37:44 2021 +0800
init zipkin and jaeger integration project (#9507)
---
.../pom.xml | 2 +
.../Dockerfile | 27 ++++
.../pom.xml | 158 +++++++++++++++++++++
.../src/test/assembly/bin/start.sh | 71 +++++++++
.../src/test/assembly/bin/stop.sh | 51 +++++++
.../shardingsphere-proxy-agent-jaeger-assembly.xml | 58 ++++++++
.../agent/test/jaeger/JaegerPluginIT.java | 54 +++++++
.../src/test/resources/env/engine-env.properties | 26 ++++
.../src/test/resources/env/mysql/init.sql | 34 +++++
.../Dockerfile | 27 ++++
.../pom.xml | 158 +++++++++++++++++++++
.../src/test/assembly/bin/start.sh | 71 +++++++++
.../src/test/assembly/bin/stop.sh | 51 +++++++
.../shardingsphere-proxy-agent-zipkin-assembly.xml | 58 ++++++++
.../agent/test/zipkin/ZipkinPluginIT.java | 54 +++++++
.../src/test/resources/env/engine-env.properties | 26 ++++
.../src/test/resources/env/mysql/init.sql | 34 +++++
17 files changed, 960 insertions(+)
diff --git a/shardingsphere-test/shardingsphere-integration-agent-test/shardingsphere-integration-agent-test-plugins/pom.xml b/shardingsphere-test/shardingsphere-integration-agent-test/shardingsphere-integration-agent-test-plugins/pom.xml
index b55de54..6f9951a 100644
--- a/shardingsphere-test/shardingsphere-integration-agent-test/shardingsphere-integration-agent-test-plugins/pom.xml
+++ b/shardingsphere-test/shardingsphere-integration-agent-test/shardingsphere-integration-agent-test-plugins/pom.xml
@@ -32,6 +32,8 @@
<modules>
<module>shardingsphere-integration-agent-test-metrics</module>
<module>shardingsphere-integration-agent-test-common</module>
+ <module>shardingsphere-integration-agent-test-zipkin</module>
+ <module>shardingsphere-integration-agent-test-jaeger</module>
</modules>
</project>
diff --git a/shardingsphere-test/shardingsphere-integration-agent-test/shardingsphere-integration-agent-test-plugins/shardingsphere-integration-agent-test-jaeger/Dockerfile b/shardingsphere-test/shardingsphere-integration-agent-test/shardingsphere-integration-agent-test-plugins/shardingsphere-integration-agent-test-jaeger/Dockerfile
new file mode 100644
index 0000000..c4559b0
--- /dev/null
+++ b/shardingsphere-test/shardingsphere-integration-agent-test/shardingsphere-integration-agent-test-plugins/shardingsphere-integration-agent-test-jaeger/Dockerfile
@@ -0,0 +1,27 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+FROM openjdk:8-jdk-alpine
+
+ARG APP_NAME
+ENV WAIT_VERSION 2.7.2
+
+ADD target/${APP_NAME}.tar.gz /opt
+ADD https://github.com/ufoscout/docker-compose-wait/releases/download/$WAIT_VERSION/wait /wait
+RUN chmod +x /wait
+RUN mv /opt/${APP_NAME} /opt/shardingsphere-proxy-agent-jaeger
+ENTRYPOINT /wait && /opt/shardingsphere-proxy-agent-jaeger/bin/start.sh && tail -f /opt/shardingsphere-proxy-agent-jaeger/logs/stdout.log
diff --git a/shardingsphere-test/shardingsphere-integration-agent-test/shardingsphere-integration-agent-test-plugins/shardingsphere-integration-agent-test-jaeger/pom.xml b/shardingsphere-test/shardingsphere-integration-agent-test/shardingsphere-integration-agent-test-plugins/shardingsphere-integration-agent-test-jaeger/pom.xml
new file mode 100644
index 0000000..c325b36
--- /dev/null
+++ b/shardingsphere-test/shardingsphere-integration-agent-test/shardingsphere-integration-agent-test-plugins/shardingsphere-integration-agent-test-jaeger/pom.xml
@@ -0,0 +1,158 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one or more
+ ~ contributor license agreements. See the NOTICE file distributed with
+ ~ this work for additional information regarding copyright ownership.
+ ~ The ASF licenses this file to You under the Apache License, Version 2.0
+ ~ (the "License"); you may not use this file except in compliance with
+ ~ the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.apache.shardingsphere</groupId>
+ <artifactId>shardingsphere-integration-agent-test-plugins</artifactId>
+ <version>5.0.0-RC1-SNAPSHOT</version>
+ </parent>
+ <artifactId>shardingsphere-integration-agent-test-jaeger</artifactId>
+ <name>${project.artifactId}</name>
+
+ <properties>
+ <maven.deploy.skip>true</maven.deploy.skip>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.shardingsphere</groupId>
+ <artifactId>shardingsphere-integration-agent-test-common</artifactId>
+ <version>${project.version}</version>
+ <type>test-jar</type>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.shardingsphere</groupId>
+ <artifactId>shardingsphere-jdbc-core</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.shardingsphere</groupId>
+ <artifactId>shardingsphere-proxy-bootstrap</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>mysql</groupId>
+ <artifactId>mysql-connector-java</artifactId>
+ <scope>runtime</scope>
+ </dependency>
+ <dependency>
+ <groupId>ch.qos.logback</groupId>
+ <artifactId>logback-classic</artifactId>
+ <scope>runtime</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.commons</groupId>
+ <artifactId>commons-dbcp2</artifactId>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+ <profiles>
+ <profile>
+ <id>it.env.jaeger</id>
+ <properties>
+ <it.env>jaeger</it.env>
+ </properties>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <configuration>
+ <appendAssemblyId>false</appendAssemblyId>
+ <descriptors>
+ <descriptor>src/test/assembly/shardingsphere-proxy-agent-jaeger-assembly.xml</descriptor>
+ </descriptors>
+ </configuration>
+ <executions>
+ <execution>
+ <id>assembly</id>
+ <phase>package</phase>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>com.spotify</groupId>
+ <artifactId>dockerfile-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>shardingsphere-proxy-bin</id>
+ <goals>
+ <goal>build</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <repository>apache/shardingsphere-proxy-agent-jaeger-test</repository>
+ <tag>${project.version}</tag>
+ <tag>latest</tag>
+ <buildArgs>
+ <APP_NAME>${project.build.finalName}</APP_NAME>
+ </buildArgs>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-failsafe-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>integration-tests</id>
+ <goals>
+ <goal>integration-test</goal>
+ <goal>verify</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <artifactId>maven-resources-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>copy-resources</id>
+ <phase>validate</phase>
+ <goals>
+ <goal>copy-resources</goal>
+ </goals>
+ <configuration>
+ <outputDirectory>target/test-classes</outputDirectory>
+ <resources>
+ <resource>
+ <directory>src/test/resources</directory>
+ <filtering>true</filtering>
+ </resource>
+ </resources>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
\ No newline at end of file
diff --git a/shardingsphere-test/shardingsphere-integration-agent-test/shardingsphere-integration-agent-test-plugins/shardingsphere-integration-agent-test-jaeger/src/test/assembly/bin/start.sh b/shardingsphere-test/shardingsphere-integration-agent-test/shardingsphere-integration-agent-test-plugins/shardingsphere-integration-agent-test-jaeger/src/test/assembly/bin/start.sh
new file mode 100644
index 0000000..757c842
--- /dev/null
+++ b/shardingsphere-test/shardingsphere-integration-agent-test/shardingsphere-integration-agent-test-plugins/shardingsphere-integration-agent-test-jaeger/src/test/assembly/bin/start.sh
@@ -0,0 +1,71 @@
+#!/bin/sh
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+SERVER_NAME=ShardingSphere-Proxy-Metrics
+
+cd `dirname $0`
+cd ..
+DEPLOY_DIR=`pwd`
+
+LOGS_DIR=${DEPLOY_DIR}/logs
+if [ ! -d ${LOGS_DIR} ]; then
+ mkdir ${LOGS_DIR}
+fi
+
+STDOUT_FILE=${LOGS_DIR}/stdout.log
+EXT_LIB=${DEPLOY_DIR}/ext-lib
+
+CLASS_PATH=.:${DEPLOY_DIR}/lib/*:${EXT_LIB}/*
+
+JAVA_OPTS=" -Djava.awt.headless=true -Djava.net.preferIPv4Stack=true -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=3308"
+
+JAVA_MEM_OPTS=" -server -Xmx2g -Xms2g -Xmn1g -Xss256k -XX:+DisableExplicitGC -XX:+UseConcMarkSweepGC -XX:+CMSParallelRemarkEnabled -XX:LargePageSizeInBytes=128m -XX:+UseFastAccessorMethods -XX:+UseCMSInitiatingOccupancyOnly -XX:CMSInitiatingOccupancyFraction=70 "
+
+MAIN_CLASS=org.apache.shardingsphere.proxy.Bootstrap
+
+print_usage() {
+ echo "usage: start.sh [port] [config_dir]"
+ echo " port: proxy listen port, default is 3307"
+ echo " config_dir: proxy config directory, default is conf"
+ exit 0
+}
+
+if [ "$1" == "-h" ] || [ "$1" == "--help" ] ; then
+ print_usage
+fi
+
+echo "Starting the $SERVER_NAME ..."
+
+if [ $# == 1 ]; then
+ MAIN_CLASS=${MAIN_CLASS}" "$1
+ echo "The port is $1"
+ CLASS_PATH=${DEPLOY_DIR}/conf:${CLASS_PATH}
+fi
+
+if [ $# == 2 ]; then
+ MAIN_CLASS=${MAIN_CLASS}" "$1" "$2
+ echo "The port is $1"
+ echo "The configuration path is $DEPLOY_DIR/$2"
+ CLASS_PATH=${DEPLOY_DIR}/$2:${CLASS_PATH}
+fi
+
+echo "The classpath is ${CLASS_PATH}"
+
+nohup java ${JAVA_OPTS} ${JAVA_MEM_OPTS} -javaagent:/opt/shardingsphere-proxy-agent-zipkin/shardingsphere-agent.jar -classpath ${CLASS_PATH} ${MAIN_CLASS} >> ${STDOUT_FILE} 2>&1 &
+sleep 1
+echo "Please check the STDOUT file: $STDOUT_FILE"
diff --git a/shardingsphere-test/shardingsphere-integration-agent-test/shardingsphere-integration-agent-test-plugins/shardingsphere-integration-agent-test-jaeger/src/test/assembly/bin/stop.sh b/shardingsphere-test/shardingsphere-integration-agent-test/shardingsphere-integration-agent-test-plugins/shardingsphere-integration-agent-test-jaeger/src/test/assembly/bin/stop.sh
new file mode 100644
index 0000000..da8909e
--- /dev/null
+++ b/shardingsphere-test/shardingsphere-integration-agent-test/shardingsphere-integration-agent-test-plugins/shardingsphere-integration-agent-test-jaeger/src/test/assembly/bin/stop.sh
@@ -0,0 +1,51 @@
+#!/bin/sh
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+SERVER_NAME=ShardingSphere-Proxy
+
+cd `dirname $0`
+cd ..
+DEPLOY_DIR=`pwd`
+
+PIDS=`ps -ef | grep java | grep "$DEPLOY_DIR" | grep -v grep |awk '{print $2}'`
+if [ -z "$PIDS" ]; then
+ echo "ERROR: The $SERVER_NAME does not started!"
+ exit 1
+fi
+
+echo -e "Stopping the $SERVER_NAME ...\c"
+for PID in ${PIDS} ; do
+ kill ${PID} > /dev/null 2>&1
+done
+
+COUNT=0
+while [ ${COUNT} -lt 1 ]; do
+ echo -e ".\c"
+ sleep 1
+ COUNT=1
+ for PID in ${PIDS} ; do
+ PID_EXIST=`ps -f -p ${PID} | grep java`
+ if [ -n "$PID_EXIST" ]; then
+ COUNT=0
+ break
+ fi
+ done
+done
+
+echo "OK!"
+echo "PID: $PIDS"
diff --git a/shardingsphere-test/shardingsphere-integration-agent-test/shardingsphere-integration-agent-test-plugins/shardingsphere-integration-agent-test-jaeger/src/test/assembly/shardingsphere-proxy-agent-jaeger-assembly.xml b/shardingsphere-test/shardingsphere-integration-agent-test/shardingsphere-integration-agent-test-plugins/shardingsphere-integration-agent-test-jaeger/src/test/assembly/shardingsphere-proxy-agent-jaeger-assembly.xml
new file mode 100644
index 0000000..9a9e1c9
--- /dev/null
+++ b/shardingsphere-test/shardingsphere-integration-agent-test/shardingsphere-integration-agent-test-plugins/shardingsphere-integration-agent-test-jaeger/src/test/assembly/shardingsphere-proxy-agent-jaeger-assembly.xml
@@ -0,0 +1,58 @@
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one or more
+ ~ contributor license agreements. See the NOTICE file distributed with
+ ~ this work for additional information regarding copyright ownership.
+ ~ The ASF licenses this file to You under the Apache License, Version 2.0
+ ~ (the "License"); you may not use this file except in compliance with
+ ~ the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+
+<assembly xmlns="http://maven.apache.org/ASSEMBLY/2.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/ASSEMBLY/2.0.0 http://maven.apache.org/xsd/assembly-2.0.0.xsd">
+ <id>shardingsphere-proxy-bin</id>
+ <formats>
+ <format>tar.gz</format>
+ </formats>
+ <includeBaseDirectory>true</includeBaseDirectory>
+
+ <fileSets>
+ <fileSet>
+ <directory>${project.basedir}/../../../../shardingsphere-agent/shardingsphere-agent-distribution/target/shardingsphere-agent/plugins</directory>
+ <outputDirectory>./plugins</outputDirectory>
+ <includes>
+ <include>shardingsphere-agent-tracing-jaeger-*.jar</include>
+ </includes>
+ </fileSet>
+ <fileSet>
+ <directory>${project.basedir}/../../../../shardingsphere-agent/shardingsphere-agent-bootstrap/target</directory>
+ <outputDirectory>./</outputDirectory>
+ <includes>
+ <include>shardingsphere-agent.jar</include>
+ </includes>
+ </fileSet>
+ <fileSet>
+ <directory>src/test/assembly/bin</directory>
+ <lineEnding>unix</lineEnding>
+ <includes>
+ <include>*.sh</include>
+ </includes>
+ <outputDirectory>bin</outputDirectory>
+ <fileMode>0755</fileMode>
+ </fileSet>
+ </fileSets>
+
+ <dependencySets>
+ <dependencySet>
+ <outputDirectory>lib</outputDirectory>
+ <fileMode>0644</fileMode>
+ </dependencySet>
+ </dependencySets>
+</assembly>
diff --git a/shardingsphere-test/shardingsphere-integration-agent-test/shardingsphere-integration-agent-test-plugins/shardingsphere-integration-agent-test-jaeger/src/test/java/org/apache/shardingsphere/integration/agent/test/jaeger/JaegerPluginIT.java b/shardingsphere-test/shardingsphere-integration-agent-test/shardingsphere-integration-agent-test-plugins/shardingsphere-integration-agent-test-jaeger/src/test/java/org/apache/shardingsphere/integration/agent/test/jaeger/JaegerPluginIT.java
new file mode 100644
index 0000000..c484331
--- /dev/null
+++ b/shardingsphere-test/shardingsphere-integration-agent-test/shardingsphere-integration-agent-test-plugins/shardingsphere-integration-agent-test-jaeger/src/test/java/org/apache/shardingsphere/integration/agent/test/jaeger/JaegerPluginIT.java
@@ -0,0 +1,54 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.integration.agent.test.jaeger;
+
+import lombok.extern.slf4j.Slf4j;
+import org.apache.shardingsphere.integration.agent.test.common.entity.OrderEntity;
+import org.apache.shardingsphere.integration.agent.test.common.env.IntegrationTestEnvironment;
+import org.apache.shardingsphere.integration.agent.test.common.util.JDBCAgentTestUtils;
+import org.junit.Ignore;
+import org.junit.Test;
+
+import javax.sql.DataSource;
+import java.util.ArrayList;
+import java.util.List;
+
+@Slf4j
+public final class JaegerPluginIT {
+
+ @Test
+ @Ignore
+ public void assertProxyWithAgent() {
+ if (IntegrationTestEnvironment.getInstance().isEnvironmentPrepared()) {
+ DataSource dataSource = IntegrationTestEnvironment.getInstance().getDataSource();
+ List<Long> results = new ArrayList<>(10);
+ for (int i = 1; i <= 10; i++) {
+ OrderEntity orderEntity = new OrderEntity(i, i, "INSERT_TEST");
+ JDBCAgentTestUtils.insertOrder(orderEntity, dataSource);
+ results.add(orderEntity.getOrderId());
+ }
+ OrderEntity orderEntity = new OrderEntity(1000, 1000, "ROLL_BACK");
+ JDBCAgentTestUtils.insertOrderRollback(orderEntity, dataSource);
+ JDBCAgentTestUtils.updateOrderStatus(orderEntity, dataSource);
+ JDBCAgentTestUtils.selectAllOrders(dataSource);
+ for (Long each : results) {
+ JDBCAgentTestUtils.deleteOrderByOrderId(each, dataSource);
+ }
+ }
+ }
+}
diff --git a/shardingsphere-test/shardingsphere-integration-agent-test/shardingsphere-integration-agent-test-plugins/shardingsphere-integration-agent-test-jaeger/src/test/resources/env/engine-env.properties b/shardingsphere-test/shardingsphere-integration-agent-test/shardingsphere-integration-agent-test-plugins/shardingsphere-integration-agent-test-jaeger/src/test/resources/env/engine-env.properties
new file mode 100644
index 0000000..b377d1b
--- /dev/null
+++ b/shardingsphere-test/shardingsphere-integration-agent-test/shardingsphere-integration-agent-test-plugins/shardingsphere-integration-agent-test-jaeger/src/test/resources/env/engine-env.properties
@@ -0,0 +1,26 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+it.env.type=${it.env}
+it.env.value=zipkin
+
+proxy.url=jdbc:mysql://127.0.0.1:45070/agent-jaeger-db?serverTimezone=UTC&useSSL=false&useLocalSessionState=true&characterEncoding=utf-8
+proxy.username=root
+proxy.password=root
+proxy.retry=30
+proxy.waitMs=1000
+
diff --git a/shardingsphere-test/shardingsphere-integration-agent-test/shardingsphere-integration-agent-test-plugins/shardingsphere-integration-agent-test-jaeger/src/test/resources/env/mysql/init.sql b/shardingsphere-test/shardingsphere-integration-agent-test/shardingsphere-integration-agent-test-plugins/shardingsphere-integration-agent-test-jaeger/src/test/resources/env/mysql/init.sql
new file mode 100644
index 0000000..c4d13f5
--- /dev/null
+++ b/shardingsphere-test/shardingsphere-integration-agent-test/shardingsphere-integration-agent-test-plugins/shardingsphere-integration-agent-test-jaeger/src/test/resources/env/mysql/init.sql
@@ -0,0 +1,34 @@
+--
+-- Licensed to the Apache Software Foundation (ASF) under one or more
+-- contributor license agreements. See the NOTICE file distributed with
+-- this work for additional information regarding copyright ownership.
+-- The ASF licenses this file to You under the Apache License, Version 2.0
+-- (the "License"); you may not use this file except in compliance with
+-- the License. You may obtain a copy of the License at
+--
+-- http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
+
+CREATE USER IF NOT EXISTS 'root'@'%' IDENTIFIED BY '';
+GRANT All privileges ON *.* TO 'root'@'%';
+
+SET character_set_database='utf8';
+SET character_set_server='utf8';
+
+DROP DATABASE IF EXISTS agent_jaeger_db_0;
+DROP DATABASE IF EXISTS agent_jaeger_db_1;
+
+CREATE DATABASE agent_jaeger_db_0;
+CREATE DATABASE agent_jaeger_db_1;
+
+CREATE TABLE agent_jaeger_db_0.t_order_0 (order_id INT NOT NULL, user_id INT NOT NULL, status VARCHAR(45) NULL, PRIMARY KEY (order_id));
+CREATE TABLE agent_jaeger_db_0.t_order_1 (order_id INT NOT NULL, user_id INT NOT NULL, status VARCHAR(45) NULL, PRIMARY KEY (order_id));
+
+CREATE TABLE agent_jaeger_db_1.t_order_0 (order_id INT NOT NULL, user_id INT NOT NULL, status VARCHAR(45) NULL, PRIMARY KEY (order_id));
+CREATE TABLE agent_jaeger_db_1.t_order_1 (order_id INT NOT NULL, user_id INT NOT NULL, status VARCHAR(45) NULL, PRIMARY KEY (order_id));
diff --git a/shardingsphere-test/shardingsphere-integration-agent-test/shardingsphere-integration-agent-test-plugins/shardingsphere-integration-agent-test-zipkin/Dockerfile b/shardingsphere-test/shardingsphere-integration-agent-test/shardingsphere-integration-agent-test-plugins/shardingsphere-integration-agent-test-zipkin/Dockerfile
new file mode 100644
index 0000000..59af1d4
--- /dev/null
+++ b/shardingsphere-test/shardingsphere-integration-agent-test/shardingsphere-integration-agent-test-plugins/shardingsphere-integration-agent-test-zipkin/Dockerfile
@@ -0,0 +1,27 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+FROM openjdk:8-jdk-alpine
+
+ARG APP_NAME
+ENV WAIT_VERSION 2.7.2
+
+ADD target/${APP_NAME}.tar.gz /opt
+ADD https://github.com/ufoscout/docker-compose-wait/releases/download/$WAIT_VERSION/wait /wait
+RUN chmod +x /wait
+RUN mv /opt/${APP_NAME} /opt/shardingsphere-proxy-agent-zipkin
+ENTRYPOINT /wait && /opt/shardingsphere-proxy-agent-zipkin/bin/start.sh && tail -f /opt/shardingsphere-proxy-agent-zipkin/logs/stdout.log
diff --git a/shardingsphere-test/shardingsphere-integration-agent-test/shardingsphere-integration-agent-test-plugins/shardingsphere-integration-agent-test-zipkin/pom.xml b/shardingsphere-test/shardingsphere-integration-agent-test/shardingsphere-integration-agent-test-plugins/shardingsphere-integration-agent-test-zipkin/pom.xml
new file mode 100644
index 0000000..981be3b
--- /dev/null
+++ b/shardingsphere-test/shardingsphere-integration-agent-test/shardingsphere-integration-agent-test-plugins/shardingsphere-integration-agent-test-zipkin/pom.xml
@@ -0,0 +1,158 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one or more
+ ~ contributor license agreements. See the NOTICE file distributed with
+ ~ this work for additional information regarding copyright ownership.
+ ~ The ASF licenses this file to You under the Apache License, Version 2.0
+ ~ (the "License"); you may not use this file except in compliance with
+ ~ the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.apache.shardingsphere</groupId>
+ <artifactId>shardingsphere-integration-agent-test-plugins</artifactId>
+ <version>5.0.0-RC1-SNAPSHOT</version>
+ </parent>
+ <artifactId>shardingsphere-integration-agent-test-zipkin</artifactId>
+ <name>${project.artifactId}</name>
+
+ <properties>
+ <maven.deploy.skip>true</maven.deploy.skip>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.shardingsphere</groupId>
+ <artifactId>shardingsphere-integration-agent-test-common</artifactId>
+ <version>${project.version}</version>
+ <type>test-jar</type>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.shardingsphere</groupId>
+ <artifactId>shardingsphere-jdbc-core</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.shardingsphere</groupId>
+ <artifactId>shardingsphere-proxy-bootstrap</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>mysql</groupId>
+ <artifactId>mysql-connector-java</artifactId>
+ <scope>runtime</scope>
+ </dependency>
+ <dependency>
+ <groupId>ch.qos.logback</groupId>
+ <artifactId>logback-classic</artifactId>
+ <scope>runtime</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.commons</groupId>
+ <artifactId>commons-dbcp2</artifactId>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+ <profiles>
+ <profile>
+ <id>it.env.zipkin</id>
+ <properties>
+ <it.env>zipkin</it.env>
+ </properties>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <configuration>
+ <appendAssemblyId>false</appendAssemblyId>
+ <descriptors>
+ <descriptor>src/test/assembly/shardingsphere-proxy-agent-zipkin-assembly.xml</descriptor>
+ </descriptors>
+ </configuration>
+ <executions>
+ <execution>
+ <id>assembly</id>
+ <phase>package</phase>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>com.spotify</groupId>
+ <artifactId>dockerfile-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>shardingsphere-proxy-bin</id>
+ <goals>
+ <goal>build</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <repository>apache/shardingsphere-proxy-agent-zipkin-test</repository>
+ <tag>${project.version}</tag>
+ <tag>latest</tag>
+ <buildArgs>
+ <APP_NAME>${project.build.finalName}</APP_NAME>
+ </buildArgs>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-failsafe-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>integration-tests</id>
+ <goals>
+ <goal>integration-test</goal>
+ <goal>verify</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <artifactId>maven-resources-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>copy-resources</id>
+ <phase>validate</phase>
+ <goals>
+ <goal>copy-resources</goal>
+ </goals>
+ <configuration>
+ <outputDirectory>target/test-classes</outputDirectory>
+ <resources>
+ <resource>
+ <directory>src/test/resources</directory>
+ <filtering>true</filtering>
+ </resource>
+ </resources>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
\ No newline at end of file
diff --git a/shardingsphere-test/shardingsphere-integration-agent-test/shardingsphere-integration-agent-test-plugins/shardingsphere-integration-agent-test-zipkin/src/test/assembly/bin/start.sh b/shardingsphere-test/shardingsphere-integration-agent-test/shardingsphere-integration-agent-test-plugins/shardingsphere-integration-agent-test-zipkin/src/test/assembly/bin/start.sh
new file mode 100644
index 0000000..757c842
--- /dev/null
+++ b/shardingsphere-test/shardingsphere-integration-agent-test/shardingsphere-integration-agent-test-plugins/shardingsphere-integration-agent-test-zipkin/src/test/assembly/bin/start.sh
@@ -0,0 +1,71 @@
+#!/bin/sh
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+SERVER_NAME=ShardingSphere-Proxy-Metrics
+
+cd `dirname $0`
+cd ..
+DEPLOY_DIR=`pwd`
+
+LOGS_DIR=${DEPLOY_DIR}/logs
+if [ ! -d ${LOGS_DIR} ]; then
+ mkdir ${LOGS_DIR}
+fi
+
+STDOUT_FILE=${LOGS_DIR}/stdout.log
+EXT_LIB=${DEPLOY_DIR}/ext-lib
+
+CLASS_PATH=.:${DEPLOY_DIR}/lib/*:${EXT_LIB}/*
+
+JAVA_OPTS=" -Djava.awt.headless=true -Djava.net.preferIPv4Stack=true -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=3308"
+
+JAVA_MEM_OPTS=" -server -Xmx2g -Xms2g -Xmn1g -Xss256k -XX:+DisableExplicitGC -XX:+UseConcMarkSweepGC -XX:+CMSParallelRemarkEnabled -XX:LargePageSizeInBytes=128m -XX:+UseFastAccessorMethods -XX:+UseCMSInitiatingOccupancyOnly -XX:CMSInitiatingOccupancyFraction=70 "
+
+MAIN_CLASS=org.apache.shardingsphere.proxy.Bootstrap
+
+print_usage() {
+ echo "usage: start.sh [port] [config_dir]"
+ echo " port: proxy listen port, default is 3307"
+ echo " config_dir: proxy config directory, default is conf"
+ exit 0
+}
+
+if [ "$1" == "-h" ] || [ "$1" == "--help" ] ; then
+ print_usage
+fi
+
+echo "Starting the $SERVER_NAME ..."
+
+if [ $# == 1 ]; then
+ MAIN_CLASS=${MAIN_CLASS}" "$1
+ echo "The port is $1"
+ CLASS_PATH=${DEPLOY_DIR}/conf:${CLASS_PATH}
+fi
+
+if [ $# == 2 ]; then
+ MAIN_CLASS=${MAIN_CLASS}" "$1" "$2
+ echo "The port is $1"
+ echo "The configuration path is $DEPLOY_DIR/$2"
+ CLASS_PATH=${DEPLOY_DIR}/$2:${CLASS_PATH}
+fi
+
+echo "The classpath is ${CLASS_PATH}"
+
+nohup java ${JAVA_OPTS} ${JAVA_MEM_OPTS} -javaagent:/opt/shardingsphere-proxy-agent-zipkin/shardingsphere-agent.jar -classpath ${CLASS_PATH} ${MAIN_CLASS} >> ${STDOUT_FILE} 2>&1 &
+sleep 1
+echo "Please check the STDOUT file: $STDOUT_FILE"
diff --git a/shardingsphere-test/shardingsphere-integration-agent-test/shardingsphere-integration-agent-test-plugins/shardingsphere-integration-agent-test-zipkin/src/test/assembly/bin/stop.sh b/shardingsphere-test/shardingsphere-integration-agent-test/shardingsphere-integration-agent-test-plugins/shardingsphere-integration-agent-test-zipkin/src/test/assembly/bin/stop.sh
new file mode 100644
index 0000000..da8909e
--- /dev/null
+++ b/shardingsphere-test/shardingsphere-integration-agent-test/shardingsphere-integration-agent-test-plugins/shardingsphere-integration-agent-test-zipkin/src/test/assembly/bin/stop.sh
@@ -0,0 +1,51 @@
+#!/bin/sh
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+SERVER_NAME=ShardingSphere-Proxy
+
+cd `dirname $0`
+cd ..
+DEPLOY_DIR=`pwd`
+
+PIDS=`ps -ef | grep java | grep "$DEPLOY_DIR" | grep -v grep |awk '{print $2}'`
+if [ -z "$PIDS" ]; then
+ echo "ERROR: The $SERVER_NAME does not started!"
+ exit 1
+fi
+
+echo -e "Stopping the $SERVER_NAME ...\c"
+for PID in ${PIDS} ; do
+ kill ${PID} > /dev/null 2>&1
+done
+
+COUNT=0
+while [ ${COUNT} -lt 1 ]; do
+ echo -e ".\c"
+ sleep 1
+ COUNT=1
+ for PID in ${PIDS} ; do
+ PID_EXIST=`ps -f -p ${PID} | grep java`
+ if [ -n "$PID_EXIST" ]; then
+ COUNT=0
+ break
+ fi
+ done
+done
+
+echo "OK!"
+echo "PID: $PIDS"
diff --git a/shardingsphere-test/shardingsphere-integration-agent-test/shardingsphere-integration-agent-test-plugins/shardingsphere-integration-agent-test-zipkin/src/test/assembly/shardingsphere-proxy-agent-zipkin-assembly.xml b/shardingsphere-test/shardingsphere-integration-agent-test/shardingsphere-integration-agent-test-plugins/shardingsphere-integration-agent-test-zipkin/src/test/assembly/shardingsphere-proxy-agent-zipkin-assembly.xml
new file mode 100644
index 0000000..524ee44
--- /dev/null
+++ b/shardingsphere-test/shardingsphere-integration-agent-test/shardingsphere-integration-agent-test-plugins/shardingsphere-integration-agent-test-zipkin/src/test/assembly/shardingsphere-proxy-agent-zipkin-assembly.xml
@@ -0,0 +1,58 @@
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one or more
+ ~ contributor license agreements. See the NOTICE file distributed with
+ ~ this work for additional information regarding copyright ownership.
+ ~ The ASF licenses this file to You under the Apache License, Version 2.0
+ ~ (the "License"); you may not use this file except in compliance with
+ ~ the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+
+<assembly xmlns="http://maven.apache.org/ASSEMBLY/2.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/ASSEMBLY/2.0.0 http://maven.apache.org/xsd/assembly-2.0.0.xsd">
+ <id>shardingsphere-proxy-bin</id>
+ <formats>
+ <format>tar.gz</format>
+ </formats>
+ <includeBaseDirectory>true</includeBaseDirectory>
+
+ <fileSets>
+ <fileSet>
+ <directory>${project.basedir}/../../../../shardingsphere-agent/shardingsphere-agent-distribution/target/shardingsphere-agent/plugins</directory>
+ <outputDirectory>./plugins</outputDirectory>
+ <includes>
+ <include>shardingsphere-agent-tracing-zipkin-*.jar</include>
+ </includes>
+ </fileSet>
+ <fileSet>
+ <directory>${project.basedir}/../../../../shardingsphere-agent/shardingsphere-agent-bootstrap/target</directory>
+ <outputDirectory>./</outputDirectory>
+ <includes>
+ <include>shardingsphere-agent.jar</include>
+ </includes>
+ </fileSet>
+ <fileSet>
+ <directory>src/test/assembly/bin</directory>
+ <lineEnding>unix</lineEnding>
+ <includes>
+ <include>*.sh</include>
+ </includes>
+ <outputDirectory>bin</outputDirectory>
+ <fileMode>0755</fileMode>
+ </fileSet>
+ </fileSets>
+
+ <dependencySets>
+ <dependencySet>
+ <outputDirectory>lib</outputDirectory>
+ <fileMode>0644</fileMode>
+ </dependencySet>
+ </dependencySets>
+</assembly>
diff --git a/shardingsphere-test/shardingsphere-integration-agent-test/shardingsphere-integration-agent-test-plugins/shardingsphere-integration-agent-test-zipkin/src/test/java/org/apache/shardingsphere/integration/agent/test/zipkin/ZipkinPluginIT.java b/shardingsphere-test/shardingsphere-integration-agent-test/shardingsphere-integration-agent-test-plugins/shardingsphere-integration-agent-test-zipkin/src/test/java/org/apache/shardingsphere/integration/agent/test/zipkin/ZipkinPluginIT.java
new file mode 100644
index 0000000..dd39cd4
--- /dev/null
+++ b/shardingsphere-test/shardingsphere-integration-agent-test/shardingsphere-integration-agent-test-plugins/shardingsphere-integration-agent-test-zipkin/src/test/java/org/apache/shardingsphere/integration/agent/test/zipkin/ZipkinPluginIT.java
@@ -0,0 +1,54 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.integration.agent.test.zipkin;
+
+import lombok.extern.slf4j.Slf4j;
+import org.apache.shardingsphere.integration.agent.test.common.entity.OrderEntity;
+import org.apache.shardingsphere.integration.agent.test.common.env.IntegrationTestEnvironment;
+import org.apache.shardingsphere.integration.agent.test.common.util.JDBCAgentTestUtils;
+import org.junit.Ignore;
+import org.junit.Test;
+
+import javax.sql.DataSource;
+import java.util.ArrayList;
+import java.util.List;
+
+@Slf4j
+public final class ZipkinPluginIT {
+
+ @Test
+ @Ignore
+ public void assertProxyWithAgent() {
+ if (IntegrationTestEnvironment.getInstance().isEnvironmentPrepared()) {
+ DataSource dataSource = IntegrationTestEnvironment.getInstance().getDataSource();
+ List<Long> results = new ArrayList<>(10);
+ for (int i = 1; i <= 10; i++) {
+ OrderEntity orderEntity = new OrderEntity(i, i, "INSERT_TEST");
+ JDBCAgentTestUtils.insertOrder(orderEntity, dataSource);
+ results.add(orderEntity.getOrderId());
+ }
+ OrderEntity orderEntity = new OrderEntity(1000, 1000, "ROLL_BACK");
+ JDBCAgentTestUtils.insertOrderRollback(orderEntity, dataSource);
+ JDBCAgentTestUtils.updateOrderStatus(orderEntity, dataSource);
+ JDBCAgentTestUtils.selectAllOrders(dataSource);
+ for (Long each : results) {
+ JDBCAgentTestUtils.deleteOrderByOrderId(each, dataSource);
+ }
+ }
+ }
+}
diff --git a/shardingsphere-test/shardingsphere-integration-agent-test/shardingsphere-integration-agent-test-plugins/shardingsphere-integration-agent-test-zipkin/src/test/resources/env/engine-env.properties b/shardingsphere-test/shardingsphere-integration-agent-test/shardingsphere-integration-agent-test-plugins/shardingsphere-integration-agent-test-zipkin/src/test/resources/env/engine-env.properties
new file mode 100644
index 0000000..41857c2
--- /dev/null
+++ b/shardingsphere-test/shardingsphere-integration-agent-test/shardingsphere-integration-agent-test-plugins/shardingsphere-integration-agent-test-zipkin/src/test/resources/env/engine-env.properties
@@ -0,0 +1,26 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+it.env.type=${it.env}
+it.env.value=zipkin
+
+proxy.url=jdbc:mysql://127.0.0.1:44070/agent-zipkin-db?serverTimezone=UTC&useSSL=false&useLocalSessionState=true&characterEncoding=utf-8
+proxy.username=root
+proxy.password=root
+proxy.retry=30
+proxy.waitMs=1000
+
diff --git a/shardingsphere-test/shardingsphere-integration-agent-test/shardingsphere-integration-agent-test-plugins/shardingsphere-integration-agent-test-zipkin/src/test/resources/env/mysql/init.sql b/shardingsphere-test/shardingsphere-integration-agent-test/shardingsphere-integration-agent-test-plugins/shardingsphere-integration-agent-test-zipkin/src/test/resources/env/mysql/init.sql
new file mode 100644
index 0000000..4443162
--- /dev/null
+++ b/shardingsphere-test/shardingsphere-integration-agent-test/shardingsphere-integration-agent-test-plugins/shardingsphere-integration-agent-test-zipkin/src/test/resources/env/mysql/init.sql
@@ -0,0 +1,34 @@
+--
+-- Licensed to the Apache Software Foundation (ASF) under one or more
+-- contributor license agreements. See the NOTICE file distributed with
+-- this work for additional information regarding copyright ownership.
+-- The ASF licenses this file to You under the Apache License, Version 2.0
+-- (the "License"); you may not use this file except in compliance with
+-- the License. You may obtain a copy of the License at
+--
+-- http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
+
+CREATE USER IF NOT EXISTS 'root'@'%' IDENTIFIED BY '';
+GRANT All privileges ON *.* TO 'root'@'%';
+
+SET character_set_database='utf8';
+SET character_set_server='utf8';
+
+DROP DATABASE IF EXISTS agent_zipkin_db_0;
+DROP DATABASE IF EXISTS agent_zipkin_db_1;
+
+CREATE DATABASE agent_zipkin_db_0;
+CREATE DATABASE agent_zipkin_db_1;
+
+CREATE TABLE agent_zipkin_db_0.t_order_0 (order_id INT NOT NULL, user_id INT NOT NULL, status VARCHAR(45) NULL, PRIMARY KEY (order_id));
+CREATE TABLE agent_zipkin_db_0.t_order_1 (order_id INT NOT NULL, user_id INT NOT NULL, status VARCHAR(45) NULL, PRIMARY KEY (order_id));
+
+CREATE TABLE agent_zipkin_db_1.t_order_0 (order_id INT NOT NULL, user_id INT NOT NULL, status VARCHAR(45) NULL, PRIMARY KEY (order_id));
+CREATE TABLE agent_zipkin_db_1.t_order_1 (order_id INT NOT NULL, user_id INT NOT NULL, status VARCHAR(45) NULL, PRIMARY KEY (order_id));