You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by ke...@apache.org on 2021/08/16 01:23:53 UTC

[skywalking-satellite] branch main updated: Add e2e tests for multiple native protocol (#58)

This is an automated email from the ASF dual-hosted git repository.

kezhenxu94 pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/skywalking-satellite.git


The following commit(s) were added to refs/heads/main by this push:
     new 5001a5b  Add e2e tests for multiple native protocol (#58)
5001a5b is described below

commit 5001a5b547dbc5de494b113cb0eacd6dba7c9f89
Author: mrproliu <74...@qq.com>
AuthorDate: Mon Aug 16 09:23:46 2021 +0800

    Add e2e tests for multiple native protocol (#58)
---
 .github/workflows/e2e.yaml                         |  34 ++++
 test/e2e/base/base-compose.yml                     | 110 +++++++++++++
 test/e2e/base/consumer/Dockerfile                  |  37 +++++
 test/e2e/base/consumer/pom.xml                     | 110 +++++++++++++
 .../apache/skywalking/e2e/E2EConfiguration.java    |  30 ++++
 .../apache/skywalking/e2e/Service1Application.java |  29 ++++
 .../main/java/org/apache/skywalking/e2e/User.java  |  27 +++
 .../e2e/controller/HealthController.java           |  36 ++++
 .../skywalking/e2e/controller/UserController.java  |  87 ++++++++++
 .../consumer/src/main/resources/application.yml    |  24 +++
 test/e2e/base/provider/Dockerfile                  |  41 +++++
 test/e2e/base/provider/pom.xml                     | 183 +++++++++++++++++++++
 .../java/org/apache/skywalking/e2e/KeyValue.java   |  29 ++++
 .../apache/skywalking/e2e/Service0Application.java |  41 +++++
 .../main/java/org/apache/skywalking/e2e/User.java  |  42 +++++
 .../java/org/apache/skywalking/e2e/UserRepo.java   |  24 +++
 .../e2e/controller/HealthController.java           |  31 ++++
 .../skywalking/e2e/controller/UserController.java  |  69 ++++++++
 .../apache/skywalking/e2e/profile/CreateUser.java  |  32 ++++
 .../skywalking/e2e/profile/ProfileController.java  |  42 +++++
 .../provider/src/main/resources/application.yml    |  43 +++++
 .../provider/src/main/resources/log4j.properties   |  26 +++
 .../base/provider/src/main/resources/log4j2.xml    |  44 +++++
 .../base/provider/src/main/resources/logback.xml   |  52 ++++++
 test/e2e/base/satellite/Dockerfile                 |  32 ++++
 test/e2e/case/native-protocols/docker-compose.yml  |  89 ++++++++++
 test/e2e/case/native-protocols/e2e.yaml            | 136 +++++++++++++++
 .../case/native-protocols/expected/etcd-put.yml    |  16 ++
 .../case/native-protocols/expected/event-list.yml  |  36 ++++
 .../case/native-protocols/expected/logs-list.yml   |  45 +++++
 .../expected/metrics-has-value.yml                 |  21 +++
 .../native-protocols/expected/profile-create.yml   |  17 ++
 .../native-protocols/expected/profile-list.yml     |  34 ++++
 .../expected/profile-segment-analyze.yml           |  40 +++++
 .../expected/profile-segment-detail.yml            |  42 +++++
 .../expected/profile-segment-list.yml              |  27 +++
 .../native-protocols/expected/service-endpoint.yml |  21 +++
 .../native-protocols/expected/service-instance.yml |  54 ++++++
 .../e2e/case/native-protocols/expected/service.yml |  21 +++
 .../expected/trace-info-detail.yml                 |  67 ++++++++
 .../expected/trace-users-detail.yml                |  45 +++++
 .../case/native-protocols/expected/traces-list.yml |  41 +++++
 test/e2e/case/native-protocols/lal.yaml            |  28 ++++
 43 files changed, 2035 insertions(+)

diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml
new file mode 100644
index 0000000..387981c
--- /dev/null
+++ b/.github/workflows/e2e.yaml
@@ -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.
+name: E2E
+
+on:
+  pull_request:
+  push:
+    branches:
+      - main
+
+jobs:
+  NativeProtocolsE2E:
+    name: Native Management/JVM/Tracing/Meter/Event/Log/Profile/CDS
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/checkout@v2
+        with:
+          submodules: true
+      - uses: apache/skywalking-infra-e2e@de5be41596f27867a15ab75dbad97ea538d863b8
+        with:
+          e2e-file: test/e2e/case/native-protocols/e2e.yaml
diff --git a/test/e2e/base/base-compose.yml b/test/e2e/base/base-compose.yml
new file mode 100644
index 0000000..48a9e0e
--- /dev/null
+++ b/test/e2e/base/base-compose.yml
@@ -0,0 +1,110 @@
+# 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.
+
+version: '2.1'
+
+services:
+
+  oap:
+    image: ghcr.io/apache/skywalking/oap:902b6c540bd0e027c28f6fb8834d88a66a62143a-es6
+    expose:
+      - 11800
+      - 12800
+      - 10051
+    networks:
+      - e2e
+    restart: on-failure
+    environment:
+      SW_STORAGE: h2
+      SW_CLUSTER_ZK_HOST_PORT: zk:2181
+      SW_STORAGE_ES_CLUSTER_NODES: es:9200
+      SW_JDBC_URL: jdbc:mysql://mysql:3306/swtest
+      SW_STORAGE_INFLUXDB_URL: http://influxdb:8086
+      SW_METER_ANALYZER_ACTIVE_FILES: spring-sleuth
+      SW_CLUSTER_ETCD_ENDPOINTS: http://etcd:2379
+      SW_SCLUSTER_ETCD_ERVICE_NAME: s1
+      SW_CONFIGURATION: etcd
+      SW_CONFIG_ETCD_PERIOD: 1
+      SW_CONFIG_ETCD_ENDPOINTS: http://etcd:2379
+    healthcheck:
+      test: ["CMD", "sh", "-c", "nc -zn 127.0.0.1 11800"]
+      interval: 5s
+      timeout: 60s
+      retries: 120
+
+  provider:
+    build:
+      context: provider
+      dockerfile: Dockerfile
+    expose:
+      - 9090
+    networks:
+      - e2e
+    environment:
+      SW_AGENT_COLLECTOR_BACKEND_SERVICES: satellite:11800
+      SW_GRPC_LOG_SERVER_HOST: satellite
+      SW_GRPC_LOG_SERVER_PORT: 11800
+      SW_COLLECTOR_GET_PROFILE_TASK_INTERVAL: 1
+      SW_GET_AGENT_DYNAMIC_CONFIG_INTERVAL: 1
+      SW_AGENT_NAME: e2e-service-provider
+      SW_INSTANCE_NAME: provider1
+      SW_LOGGING_OUTPUT: CONSOLE
+    healthcheck:
+      test: [ "CMD", "sh", "-c", "nc -zn 127.0.0.1 9090"]
+      interval: 5s
+      timeout: 60s
+      retries: 120
+
+  consumer:
+    build:
+      context: consumer
+      dockerfile: Dockerfile
+    expose:
+      - 9090
+    networks:
+      - e2e
+    environment:
+      SW_AGENT_COLLECTOR_BACKEND_SERVICES: satellite:11800
+      SW_GRPC_LOG_SERVER_HOST: satellite
+      SW_GRPC_LOG_SERVER_PORT: 11800
+      PROVIDER_URL: http://provider:9090
+      SW_AGENT_NAME: e2e-service-consumer
+      SW_INSTANCE_NAME: consumer1
+      SW_LOGGING_OUTPUT: CONSOLE
+    healthcheck:
+      test: [ "CMD", "sh", "-c", "nc -zn 127.0.0.1 9090"]
+      interval: 5s
+      timeout: 60s
+      retries: 120
+
+  satellite:
+    build:
+      context: ../../../
+      dockerfile: test/e2e/base/satellite/Dockerfile
+    expose:
+      - 11800
+    environment:
+      SATELLITE_GRPC_CLIENT: oap:11800
+      SATELLITE_LOGPIPE_SENDER_MIN_FLUSH_EVENTS: 1
+    networks:
+      - e2e
+    healthcheck:
+      test: [ "CMD", "sh", "-c", "nc -zn 127.0.0.1 11800" ]
+      interval: 5s
+      timeout: 60s
+      retries: 120
+
+networks:
+  e2e:
diff --git a/test/e2e/base/consumer/Dockerfile b/test/e2e/base/consumer/Dockerfile
new file mode 100644
index 0000000..89f453d
--- /dev/null
+++ b/test/e2e/base/consumer/Dockerfile
@@ -0,0 +1,37 @@
+# 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.
+
+ARG AGENT_TAG=9a05ad4b423a380c8da711e2a2b856ee93bc9422-es6
+ARG SW_VERSION=8.6.0
+
+FROM maven:3.8.1-jdk-8 as builder
+
+ADD . /consumer_code
+
+WORKDIR /consumer_code
+RUN mvn clean package -B -Dsw.version=8.6.0
+
+FROM ghcr.io/apache/skywalking/agent:${AGENT_TAG}
+
+VOLUME /services
+
+COPY --from=builder /consumer_code/target/e2e-service-consumer.jar /services/
+
+ENV JAVA_OPTS=""
+
+RUN echo 'agent.instance_name=${SW_INSTANCE_NAME:consumer}' >> /skywalking/agent/config/agent.config
+RUN echo 'logging.output=${SW_LOGGING_OUTPUT:CONSOLE}' >> /skywalking/agent/config/agent.config
+
+CMD ["sh", "-c", "java $JAVA_OPTS -jar /services/e2e-service-consumer.jar"]
\ No newline at end of file
diff --git a/test/e2e/base/consumer/pom.xml b/test/e2e/base/consumer/pom.xml
new file mode 100644
index 0000000..986ca42
--- /dev/null
+++ b/test/e2e/base/consumer/pom.xml
@@ -0,0 +1,110 @@
+<?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">
+    <parent>
+        <groupId>org.springframework.boot</groupId>
+        <artifactId>spring-boot-starter-parent</artifactId>
+        <version>2.2.5.RELEASE</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <packaging>jar</packaging>
+
+    <artifactId>e2e-service-consumer</artifactId>
+
+    <properties>
+        <sw.version>
+            <!--
+            Please manually set the SkyWalking version here to build in the IDE
+            (if you build from command line, just use ./mvn -Dsw.version=x.y.z),
+            but make sure not to check it into the code base / git
+            -->
+        </sw.version>
+
+        <java.version>1.8</java.version>
+        <maven.compiler.source>${java.version}</maven.compiler.source>
+        <maven.compiler.target>${java.version}</maven.compiler.target>
+        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+        <spring.boot.version>2.2.5.RELEASE</spring.boot.version>
+        <guava.version>28.2-jre</guava.version>
+        <lombok.version>1.18.20</lombok.version>
+    </properties>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-web</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-test</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-configuration-processor</artifactId>
+            <optional>true</optional>
+        </dependency>
+
+        <dependency>
+            <groupId>com.google.guava</groupId>
+            <artifactId>guava</artifactId>
+            <version>${guava.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.projectlombok</groupId>
+            <artifactId>lombok</artifactId>
+            <version>${lombok.version}</version>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.skywalking</groupId>
+            <artifactId>apm-toolkit-trace</artifactId>
+            <version>${sw.version}</version>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <finalName>e2e-service-consumer</finalName>
+        <plugins>
+            <plugin>
+                <groupId>org.springframework.boot</groupId>
+                <artifactId>spring-boot-maven-plugin</artifactId>
+                <version>${spring.boot.version}</version>
+                <configuration>
+                    <executable>true</executable>
+                    <addResources>true</addResources>
+                    <excludeDevtools>true</excludeDevtools>
+                </configuration>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>repackage</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>
diff --git a/test/e2e/base/consumer/src/main/java/org/apache/skywalking/e2e/E2EConfiguration.java b/test/e2e/base/consumer/src/main/java/org/apache/skywalking/e2e/E2EConfiguration.java
new file mode 100644
index 0000000..2e7bda2
--- /dev/null
+++ b/test/e2e/base/consumer/src/main/java/org/apache/skywalking/e2e/E2EConfiguration.java
@@ -0,0 +1,30 @@
+/*
+ * 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.skywalking.e2e;
+
+import lombok.Data;
+import org.springframework.boot.context.properties.ConfigurationProperties;
+import org.springframework.context.annotation.Configuration;
+
+@Data
+@Configuration
+@ConfigurationProperties("e2e")
+public class E2EConfiguration {
+    private String providerBaseUrl;
+}
diff --git a/test/e2e/base/consumer/src/main/java/org/apache/skywalking/e2e/Service1Application.java b/test/e2e/base/consumer/src/main/java/org/apache/skywalking/e2e/Service1Application.java
new file mode 100644
index 0000000..138f9f8
--- /dev/null
+++ b/test/e2e/base/consumer/src/main/java/org/apache/skywalking/e2e/Service1Application.java
@@ -0,0 +1,29 @@
+/*
+ * 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.skywalking.e2e;
+
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+
+@SpringBootApplication
+public class Service1Application {
+    public static void main(String[] args) {
+        SpringApplication.run(Service1Application.class, args);
+    }
+}
diff --git a/test/e2e/base/consumer/src/main/java/org/apache/skywalking/e2e/User.java b/test/e2e/base/consumer/src/main/java/org/apache/skywalking/e2e/User.java
new file mode 100644
index 0000000..66d7c0d
--- /dev/null
+++ b/test/e2e/base/consumer/src/main/java/org/apache/skywalking/e2e/User.java
@@ -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.
+ *
+ */
+
+package org.apache.skywalking.e2e;
+
+import lombok.Data;
+
+@Data
+public class User {
+    private Long id;
+    private String name;
+}
diff --git a/test/e2e/base/consumer/src/main/java/org/apache/skywalking/e2e/controller/HealthController.java b/test/e2e/base/consumer/src/main/java/org/apache/skywalking/e2e/controller/HealthController.java
new file mode 100644
index 0000000..999a015
--- /dev/null
+++ b/test/e2e/base/consumer/src/main/java/org/apache/skywalking/e2e/controller/HealthController.java
@@ -0,0 +1,36 @@
+/*
+ * 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.skywalking.e2e.controller;
+
+import lombok.RequiredArgsConstructor;
+import org.springframework.http.HttpStatus;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.ResponseStatus;
+import org.springframework.web.bind.annotation.RestController;
+
+@RestController
+@RequiredArgsConstructor
+public class HealthController {
+    @GetMapping("/health")
+    @SuppressWarnings("EmptyMethod")
+    @ResponseStatus(code = HttpStatus.OK)
+    public void hello() {
+    }
+
+}
diff --git a/test/e2e/base/consumer/src/main/java/org/apache/skywalking/e2e/controller/UserController.java b/test/e2e/base/consumer/src/main/java/org/apache/skywalking/e2e/controller/UserController.java
new file mode 100644
index 0000000..2db2c30
--- /dev/null
+++ b/test/e2e/base/consumer/src/main/java/org/apache/skywalking/e2e/controller/UserController.java
@@ -0,0 +1,87 @@
+/*
+ * 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.skywalking.e2e.controller;
+
+import com.google.common.base.Strings;
+import lombok.RequiredArgsConstructor;
+import org.apache.skywalking.apm.toolkit.trace.TraceContext;
+import org.apache.skywalking.e2e.E2EConfiguration;
+import org.apache.skywalking.e2e.User;
+import org.springframework.http.ResponseEntity;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.client.RestTemplate;
+
+import java.util.Optional;
+import java.util.Random;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+
+@RestController
+@RequiredArgsConstructor
+public class UserController {
+    private final RestTemplate restTemplate = new RestTemplate();
+
+    private final E2EConfiguration configuration;
+
+    private final int sleepMin = 500;
+
+    private final int sleepMax = 1000;
+
+    @PostMapping("/info")
+    public String info() throws InterruptedException {
+        Thread.sleep(randomSleepLong(sleepMin, sleepMax));
+
+        Optional<ResponseEntity<String>> optionalResponseEntity = Stream.of(
+            Strings.nullToEmpty(configuration.getProviderBaseUrl()).split(","))
+                                                                        .map(baseUrl -> restTemplate.postForEntity(
+                                                                            baseUrl + "/info", null, String.class))
+                                                                        .findFirst();
+        if (optionalResponseEntity.isPresent() && optionalResponseEntity.get().getStatusCodeValue() == 200) {
+            return optionalResponseEntity.get().getBody();
+        }
+        throw new RuntimeException();
+    }
+
+    @PostMapping("/users")
+    public Object createAuthor() throws InterruptedException {
+        Thread.sleep(randomSleepLong(sleepMin, sleepMax));
+
+        return Stream.of(Strings.nullToEmpty(configuration.getProviderBaseUrl()).split(","))
+                     .map(baseUrl -> restTemplate.postForEntity(baseUrl + "/users", null, User.class))
+                     .collect(Collectors.toList());
+    }
+
+    @PostMapping("/correlation")
+    public String correlation() throws InterruptedException {
+        Thread.sleep(randomSleepLong(sleepMin, sleepMax));
+        TraceContext.putCorrelation("CONSUMER_KEY", "consumer");
+
+        String baseUrl = configuration.getProviderBaseUrl();
+        ResponseEntity<String> resp = restTemplate.postForEntity(baseUrl + "/correlation", null, String.class);
+        return resp.getBody();
+    }
+
+    private long randomSleepLong(int min, int max) {
+        Random rand = new Random();
+        int randomNumber = rand.nextInt((max - min) + 1) + min;
+        return randomNumber;
+    }
+}
diff --git a/test/e2e/base/consumer/src/main/resources/application.yml b/test/e2e/base/consumer/src/main/resources/application.yml
new file mode 100644
index 0000000..13022a9
--- /dev/null
+++ b/test/e2e/base/consumer/src/main/resources/application.yml
@@ -0,0 +1,24 @@
+# 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:
+  port: 9090
+
+spring:
+  main:
+    banner-mode: 'off'
+
+e2e:
+  provider-base-url: ${PROVIDER_URL:http://127.0.0.1:9090}
diff --git a/test/e2e/base/provider/Dockerfile b/test/e2e/base/provider/Dockerfile
new file mode 100644
index 0000000..eddce3c
--- /dev/null
+++ b/test/e2e/base/provider/Dockerfile
@@ -0,0 +1,41 @@
+# 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.
+
+ARG AGENT_TAG=9a05ad4b423a380c8da711e2a2b856ee93bc9422-es6
+ARG SW_VERSION=8.6.0
+
+FROM maven:3.8.1-jdk-8 as builder
+
+ADD . /provider_code
+
+WORKDIR /provider_code
+RUN mvn clean package -B -Dsw.version=8.6.0
+
+FROM ghcr.io/apache/skywalking/agent:${AGENT_TAG}
+
+VOLUME /services
+
+COPY --from=builder /provider_code/target/e2e-service-provider.jar /services/
+
+ENV JAVA_OPTS=""
+
+RUN echo 'plugin.toolkit.log.grpc.reporter.server_host=${SW_GRPC_LOG_SERVER_HOST:satellite}' >> /skywalking/agent/config/agent.config
+RUN echo 'plugin.toolkit.log.grpc.reporter.server_port=${SW_GRPC_LOG_SERVER_PORT:11800}' >> /skywalking/agent/config/agent.config
+RUN echo 'collector.get_profile_task_interval=${SW_COLLECTOR_GET_PROFILE_TASK_INTERVAL:1}' >> /skywalking/agent/config/agent.config
+RUN echo 'collector.get_agent_dynamic_config_interval=${SW_GET_AGENT_DYNAMIC_CONFIG_INTERVAL:1}' >> /skywalking/agent/config/agent.config
+RUN echo 'agent.instance_name=${SW_INSTANCE_NAME:provider}' >> /skywalking/agent/config/agent.config
+RUN echo 'logging.output=${SW_LOGGING_OUTPUT:CONSOLE}' >> /skywalking/agent/config/agent.config
+
+CMD ["sh", "-c", "java $JAVA_OPTS -jar /services/e2e-service-provider.jar"]
diff --git a/test/e2e/base/provider/pom.xml b/test/e2e/base/provider/pom.xml
new file mode 100644
index 0000000..6d00721
--- /dev/null
+++ b/test/e2e/base/provider/pom.xml
@@ -0,0 +1,183 @@
+<?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">
+    <parent>
+        <groupId>org.springframework.boot</groupId>
+        <artifactId>spring-boot-starter-parent</artifactId>
+        <version>2.2.5.RELEASE</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <packaging>jar</packaging>
+
+    <artifactId>e2e-service-provider</artifactId>
+
+    <properties>
+        <log4j.version>1.2.17</log4j.version>
+        <log4j2.version>2.7</log4j2.version>
+        <logback.version>1.2.3</logback.version>
+
+        <sw.version>
+            <!--
+            Please manually set the SkyWalking version here to build in the IDE
+            (if you build from command line, just use ./mvn -Dsw.version=x.y.z),
+            but make sure not to check it into the code base / git
+            -->
+        </sw.version>
+
+        <java.version>1.8</java.version>
+        <maven.compiler.source>${java.version}</maven.compiler.source>
+        <maven.compiler.target>${java.version}</maven.compiler.target>
+
+        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+
+        <spring.boot.version>2.2.5.RELEASE</spring.boot.version>
+        <spring.cloud.version>2.1.2.RELEASE</spring.cloud.version>
+        <jupeter.version>5.6.0</jupeter.version>
+        <jackson.version>2.9.7</jackson.version>
+        <guava.version>28.2-jre</guava.version>
+        <h2.version>1.4.199</h2.version>
+        <mysql.version>8.0.13</mysql.version>
+        <lombok.version>1.18.20</lombok.version>
+        <kafka-clients.version>2.4.1</kafka-clients.version>
+        <jacoco.version>0.8.6</jacoco.version>
+
+        <maven-failsafe-plugin.version>2.22.0</maven-failsafe-plugin.version>
+        <maven-compiler-plugin.version>3.8.0</maven-compiler-plugin.version>
+        <maven-checkstyle-plugin.version>3.1.0</maven-checkstyle-plugin.version>
+        <maven-antrun-plugin.version>3.0.0</maven-antrun-plugin.version>
+
+        <testcontainers.version>1.15.1</testcontainers.version>
+    </properties>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-web</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-test</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-configuration-processor</artifactId>
+            <optional>true</optional>
+        </dependency>
+
+        <dependency>
+            <groupId>com.google.guava</groupId>
+            <artifactId>guava</artifactId>
+            <version>${guava.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.projectlombok</groupId>
+            <artifactId>lombok</artifactId>
+            <version>${lombok.version}</version>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-data-jpa</artifactId>
+            <version>${spring.boot.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>com.h2database</groupId>
+            <artifactId>h2</artifactId>
+            <version>${h2.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-actuator</artifactId>
+            <exclusions>
+                <exclusion>
+                    <artifactId>log4j-to-slf4j</artifactId>
+                    <groupId>org.apache.logging.log4j</groupId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.skywalking</groupId>
+            <artifactId>apm-toolkit-micrometer-registry</artifactId>
+            <version>8.2.0</version>
+        </dependency>
+        <dependency>
+            <groupId>log4j</groupId>
+            <artifactId>log4j</artifactId>
+            <version>${log4j.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.logging.log4j</groupId>
+            <artifactId>log4j-core</artifactId>
+            <version>${log4j2.version}</version>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>ch.qos.logback</groupId>
+            <artifactId>logback-classic</artifactId>
+            <version>${logback.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.skywalking</groupId>
+            <artifactId>apm-toolkit-logback-1.x</artifactId>
+            <version>${sw.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.skywalking</groupId>
+            <artifactId>apm-toolkit-log4j-1.x</artifactId>
+            <version>${sw.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.skywalking</groupId>
+            <artifactId>apm-toolkit-log4j-2.x</artifactId>
+            <version>${sw.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.skywalking</groupId>
+            <artifactId>apm-toolkit-trace</artifactId>
+            <version>${sw.version}</version>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <finalName>e2e-service-provider</finalName>
+        <plugins>
+            <plugin>
+                <groupId>org.springframework.boot</groupId>
+                <artifactId>spring-boot-maven-plugin</artifactId>
+                <version>${spring.boot.version}</version>
+                <configuration>
+                    <executable>true</executable>
+                    <addResources>true</addResources>
+                    <excludeDevtools>true</excludeDevtools>
+                </configuration>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>repackage</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+</project>
diff --git a/test/e2e/base/provider/src/main/java/org/apache/skywalking/e2e/KeyValue.java b/test/e2e/base/provider/src/main/java/org/apache/skywalking/e2e/KeyValue.java
new file mode 100644
index 0000000..64bb447
--- /dev/null
+++ b/test/e2e/base/provider/src/main/java/org/apache/skywalking/e2e/KeyValue.java
@@ -0,0 +1,29 @@
+/*
+ * 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.skywalking.e2e;
+
+import lombok.Data;
+import lombok.experimental.Accessors;
+
+@Data
+@Accessors(chain = true)
+public class KeyValue {
+
+    private String key;
+    private String value;
+}
diff --git a/test/e2e/base/provider/src/main/java/org/apache/skywalking/e2e/Service0Application.java b/test/e2e/base/provider/src/main/java/org/apache/skywalking/e2e/Service0Application.java
new file mode 100644
index 0000000..c5f8797
--- /dev/null
+++ b/test/e2e/base/provider/src/main/java/org/apache/skywalking/e2e/Service0Application.java
@@ -0,0 +1,41 @@
+/*
+ * 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.skywalking.e2e;
+
+import org.apache.skywalking.apm.meter.micrometer.SkywalkingMeterRegistry;
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.ComponentScan;
+import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
+
+@EnableJpaRepositories
+@SpringBootApplication
+@ComponentScan({"org.apache.skywalking", "test.apache.skywalking"})
+public class Service0Application {
+    public static void main(String[] args) {
+        SpringApplication.run(Service0Application.class, args);
+    }
+
+    @Bean
+    SkywalkingMeterRegistry skywalkingMeterRegistry() {
+        return new SkywalkingMeterRegistry();
+    }
+
+}
diff --git a/test/e2e/base/provider/src/main/java/org/apache/skywalking/e2e/User.java b/test/e2e/base/provider/src/main/java/org/apache/skywalking/e2e/User.java
new file mode 100644
index 0000000..2acc78a
--- /dev/null
+++ b/test/e2e/base/provider/src/main/java/org/apache/skywalking/e2e/User.java
@@ -0,0 +1,42 @@
+/*
+ * 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.skywalking.e2e;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.Id;
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.RequiredArgsConstructor;
+
+@Data
+@Entity
+@Builder
+@AllArgsConstructor
+@RequiredArgsConstructor
+public class User {
+    @Id
+    @GeneratedValue
+    private Long id;
+
+    @Column
+    private String name;
+}
diff --git a/test/e2e/base/provider/src/main/java/org/apache/skywalking/e2e/UserRepo.java b/test/e2e/base/provider/src/main/java/org/apache/skywalking/e2e/UserRepo.java
new file mode 100644
index 0000000..bafea9b
--- /dev/null
+++ b/test/e2e/base/provider/src/main/java/org/apache/skywalking/e2e/UserRepo.java
@@ -0,0 +1,24 @@
+/*
+ * 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.skywalking.e2e;
+
+import org.springframework.data.jpa.repository.JpaRepository;
+
+public interface UserRepo extends JpaRepository<User, Long> {
+}
diff --git a/test/e2e/base/provider/src/main/java/org/apache/skywalking/e2e/controller/HealthController.java b/test/e2e/base/provider/src/main/java/org/apache/skywalking/e2e/controller/HealthController.java
new file mode 100644
index 0000000..9871773
--- /dev/null
+++ b/test/e2e/base/provider/src/main/java/org/apache/skywalking/e2e/controller/HealthController.java
@@ -0,0 +1,31 @@
+/*
+ * 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.skywalking.e2e.controller;
+
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+@RestController
+@SuppressWarnings("SameReturnValue")
+public class HealthController {
+    @GetMapping("/health")
+    public String hello() {
+        return "healthy";
+    }
+}
diff --git a/test/e2e/base/provider/src/main/java/org/apache/skywalking/e2e/controller/UserController.java b/test/e2e/base/provider/src/main/java/org/apache/skywalking/e2e/controller/UserController.java
new file mode 100644
index 0000000..14f40de
--- /dev/null
+++ b/test/e2e/base/provider/src/main/java/org/apache/skywalking/e2e/controller/UserController.java
@@ -0,0 +1,69 @@
+/*
+ * 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.skywalking.e2e.controller;
+
+import lombok.RequiredArgsConstructor;
+import org.apache.skywalking.apm.toolkit.trace.TraceContext;
+import org.apache.skywalking.e2e.User;
+import org.apache.skywalking.e2e.UserRepo;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RestController;
+import org.slf4j.LoggerFactory;
+
+import java.util.Random;
+
+@RestController
+@RequiredArgsConstructor
+@SuppressWarnings("SameReturnValue")
+public class UserController {
+    private static final org.slf4j.Logger LOGBACK_LOGGER = LoggerFactory.getLogger(UserController.class);
+
+    private final UserRepo userRepo;
+    private final int sleepMin = 500;
+    private final int sleepMax = 1000;
+
+    @PostMapping("/info")
+    public String info() throws InterruptedException {
+        Thread.sleep(randomSleepLong(sleepMin, sleepMax));
+        LOGBACK_LOGGER.info("logback message==> now: {}", System.currentTimeMillis());
+        return "whatever";
+    }
+
+    @PostMapping("/users")
+    public User createAuthor() throws InterruptedException {
+        Thread.sleep(randomSleepLong(sleepMin, sleepMax));
+        return userRepo.save(User.builder().name("").build());
+    }
+
+    @PostMapping("/correlation")
+    public String correlation() throws InterruptedException {
+        Thread.sleep(randomSleepLong(sleepMin, sleepMax));
+        TraceContext.putCorrelation("PROVIDER_KEY", "provider");
+        return TraceContext.getCorrelation("CONSUMER_KEY").orElse("") + "_"
+            + TraceContext.getCorrelation("MIDDLE_KEY").orElse("") + "_"
+            + TraceContext.getCorrelation("PROVIDER_KEY").orElse("");
+    }
+
+    private long randomSleepLong(int min, int max) {
+        Random rand = new Random();
+        int randomNumber = rand.nextInt((max - min) + 1) + min;
+        return randomNumber;
+    }
+}
diff --git a/test/e2e/base/provider/src/main/java/test/apache/skywalking/e2e/profile/CreateUser.java b/test/e2e/base/provider/src/main/java/test/apache/skywalking/e2e/profile/CreateUser.java
new file mode 100644
index 0000000..30cb74a
--- /dev/null
+++ b/test/e2e/base/provider/src/main/java/test/apache/skywalking/e2e/profile/CreateUser.java
@@ -0,0 +1,32 @@
+/*
+ * 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 test.apache.skywalking.e2e.profile;
+
+import lombok.Data;
+import org.apache.skywalking.e2e.User;
+
+@Data
+public class CreateUser {
+    private String name;
+    private boolean enableProfiling;
+
+    public User toUser() {
+        return User.builder().name(name).build();
+    }
+}
diff --git a/test/e2e/base/provider/src/main/java/test/apache/skywalking/e2e/profile/ProfileController.java b/test/e2e/base/provider/src/main/java/test/apache/skywalking/e2e/profile/ProfileController.java
new file mode 100644
index 0000000..b939a84
--- /dev/null
+++ b/test/e2e/base/provider/src/main/java/test/apache/skywalking/e2e/profile/ProfileController.java
@@ -0,0 +1,42 @@
+/*
+ * 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 test.apache.skywalking.e2e.profile;
+
+import java.util.concurrent.TimeUnit;
+import lombok.RequiredArgsConstructor;
+import org.apache.skywalking.e2e.User;
+import org.apache.skywalking.e2e.UserRepo;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RestController;
+
+@RestController
+@RequiredArgsConstructor
+public class ProfileController {
+    private final UserRepo userRepo;
+
+    @PostMapping("/profile/{name}")
+    public User createAuthor(@RequestBody final CreateUser createUser) throws InterruptedException {
+        final User user = userRepo.save(createUser.toUser());
+        if (createUser.isEnableProfiling()) {
+            TimeUnit.MILLISECONDS.sleep(6200);
+        }
+        return user;
+    }
+}
diff --git a/test/e2e/base/provider/src/main/resources/application.yml b/test/e2e/base/provider/src/main/resources/application.yml
new file mode 100644
index 0000000..360c10c
--- /dev/null
+++ b/test/e2e/base/provider/src/main/resources/application.yml
@@ -0,0 +1,43 @@
+# 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:
+  port: 9090
+
+spring:
+  main:
+    banner-mode: 'off'
+  datasource:
+    url: jdbc:h2:mem:testdb
+    driver-class-name: org.h2.Driver
+    data-username: sa
+    password: sa
+    platform: org.hibernate.dialect.H2Dialect
+  jpa:
+    generate-ddl: true
+    hibernate:
+      ddl-auto: create-drop
+    properties:
+      hibernate.format_sql: true
+    show-sql: true
+
+management:
+  metrics:
+    use-global-registry: true
+    web:
+      server:
+        request:
+          autotime:
+            enabled: true
diff --git a/test/e2e/base/provider/src/main/resources/log4j.properties b/test/e2e/base/provider/src/main/resources/log4j.properties
new file mode 100644
index 0000000..56a721e
--- /dev/null
+++ b/test/e2e/base/provider/src/main/resources/log4j.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.
+log4j.rootLogger=info,CustomAppender
+log4j.appender.CustomAppender=org.apache.skywalking.apm.toolkit.log.log4j.v1.x.log.GRPCLogClientAppender
+log4j.appender.CustomAppender.layout=org.apache.log4j.PatternLayout
+log4j.appender.CustomAppender.layout.ConversionPattern=[%t] %-5p %c %x - %m%n
+
+log4j.logger.fileLogger=info,FileAppender
+log4j.appender.FileAppender=org.apache.log4j.FileAppender
+log4j.appender.FileAppender.ImmediateFlush=true
+log4j.appender.FileAppender.Append=true
+log4j.appender.FileAppender.File=/tmp/skywalking-logs/log4j1/e2e-service-provider.log
+log4j.appender.FileAppender.layout=org.apache.skywalking.apm.toolkit.log.log4j.v1.x.TraceIdPatternLayout
+log4j.appender.FileAppender.layout.ConversionPattern=[%T{SW_CTX}] [%p] %d{yyyy-MM-dd HH:mm:ss.SSS} [%t] %c:%L - %m%n
\ No newline at end of file
diff --git a/test/e2e/base/provider/src/main/resources/log4j2.xml b/test/e2e/base/provider/src/main/resources/log4j2.xml
new file mode 100644
index 0000000..65b0bbd
--- /dev/null
+++ b/test/e2e/base/provider/src/main/resources/log4j2.xml
@@ -0,0 +1,44 @@
+<?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.
+  -->
+<Configuration status="WARN">
+    <Appenders>
+        <Console name="Console" target="SYSTEM_OUT">
+            <PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n"/>
+        </Console>
+        <GRPCLogClientAppender name="grpc-log">
+            <PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n"/>
+        </GRPCLogClientAppender>
+        <RandomAccessFile name="fileAppender" fileName="/tmp/skywalking-logs/log4j2/e2e-service-provider.log" immediateFlush="true" append="true">
+            <PatternLayout>
+                <Pattern>[%sw_ctx] [%p] %d{yyyy-MM-dd HH:mm:ss.SSS} [%t] %c:%L - %m%n</Pattern>
+            </PatternLayout>
+        </RandomAccessFile>
+    </Appenders>
+
+
+
+    <Loggers>
+        <Root level="info">
+            <AppenderRef ref="Console"/>
+            <AppenderRef ref="grpc-log"/>
+        </Root>
+        <Logger name="fileLogger" level="info" additivity="false">
+            <AppenderRef ref="fileAppender"/>
+        </Logger>
+    </Loggers>
+</Configuration>
diff --git a/test/e2e/base/provider/src/main/resources/logback.xml b/test/e2e/base/provider/src/main/resources/logback.xml
new file mode 100644
index 0000000..e091cda
--- /dev/null
+++ b/test/e2e/base/provider/src/main/resources/logback.xml
@@ -0,0 +1,52 @@
+<?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.
+  -->
+<configuration scan="true" scanPeriod=" 5 seconds">
+
+    <appender name="stdout" class="ch.qos.logback.core.ConsoleAppender">
+        <encoder class="ch.qos.logback.core.encoder.LayoutWrappingEncoder">
+            <layout class="org.apache.skywalking.apm.toolkit.log.logback.v1.x.mdc.TraceIdMDCPatternLogbackLayout">
+                <Pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%X{tid}] [%thread] %-5level %logger{36} -%msg%n</Pattern>
+            </layout>
+        </encoder>
+    </appender>
+
+    <appender name="grpc-log" class="org.apache.skywalking.apm.toolkit.log.logback.v1.x.log.GRPCLogClientAppender">
+        <encoder class="ch.qos.logback.core.encoder.LayoutWrappingEncoder">
+            <layout class="org.apache.skywalking.apm.toolkit.log.logback.v1.x.mdc.TraceIdMDCPatternLogbackLayout">
+                <Pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%X{tid}] [%thread] %-5level %logger{36} -%msg%n</Pattern>
+            </layout>
+        </encoder>
+    </appender>
+
+    <appender name="fileAppender" class="ch.qos.logback.core.FileAppender">
+        <file>/tmp/skywalking-logs/logback/e2e-service-provider.log</file>
+        <encoder class="ch.qos.logback.core.encoder.LayoutWrappingEncoder">
+            <layout class="org.apache.skywalking.apm.toolkit.log.logback.v1.x.TraceIdPatternLogbackLayout">
+                <Pattern>[%sw_ctx] [%level] %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %logger:%line - %msg%n</Pattern>
+            </layout>
+        </encoder>
+    </appender>
+
+    <root level="INFO">
+        <appender-ref ref="grpc-log"/>
+        <appender-ref ref="stdout"/>
+    </root>
+    <logger name="fileLogger" level="INFO">
+        <appender-ref ref="fileAppender"/>
+    </logger>
+</configuration>
diff --git a/test/e2e/base/satellite/Dockerfile b/test/e2e/base/satellite/Dockerfile
new file mode 100644
index 0000000..a6e0d55
--- /dev/null
+++ b/test/e2e/base/satellite/Dockerfile
@@ -0,0 +1,32 @@
+# 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 golang:1.14
+
+ADD . /satellite_code
+WORKDIR /satellite_code
+
+RUN set -ex; \
+    apt-get update; \
+    apt-get install -y netcat; \
+    make linux; \
+    mkdir -p /skywalking-satellite/configs; \
+    cp configs/satellite_config.yaml /skywalking-satellite/configs/satellite_config.yaml; \
+    cp bin/skywalking-satellite-latest-linux-amd64 /skywalking-satellite/satellite;
+
+WORKDIR /skywalking-satellite
+
+ENTRYPOINT ["./satellite", "start"]
\ No newline at end of file
diff --git a/test/e2e/case/native-protocols/docker-compose.yml b/test/e2e/case/native-protocols/docker-compose.yml
new file mode 100644
index 0000000..2e62813
--- /dev/null
+++ b/test/e2e/case/native-protocols/docker-compose.yml
@@ -0,0 +1,89 @@
+# 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.
+
+version: '2.1'
+
+services:
+
+  etcd:
+    hostname: etcd
+    image: quay.io/coreos/etcd:v3.5.0
+    ports:
+      - 2379
+    networks:
+      - e2e
+    environment:
+      ETCD_LISTEN_CLIENT_URLS: http://0.0.0.0:2379
+      ETCD_ADVERTISE_CLIENT_URLS: http://0.0.0.0:2379
+      ETCD_LISTEN_PEER_URLS: http://0.0.0.0:2380
+      ETCD_INITIAL_ADVERTISE_PEER_URLS: http://0.0.0.0:2380
+      ETCD_INITIAL_CLUSTER: s1=http://0.0.0.0:2380
+      ETCD_NAME: s1
+      ETCD_DATA_DIR: /etcd-data
+    healthcheck:
+      test: ["CMD", "sh", "-c", "etcdctl endpoint health" ]
+      interval: 5s
+      timeout: 60s
+      retries: 120
+
+  oap:
+    extends:
+      file: ../../base/base-compose.yml
+      service: oap
+    environment:
+      SW_LOG_LAL_FILES: test
+      SW_CLUSTER: etcd
+    volumes:
+      - ./lal.yaml:/skywalking/config/lal/test.yaml
+    ports:
+      - 12800
+    depends_on:
+      etcd:
+        condition: service_healthy
+
+  satellite:
+    extends:
+      file: ../../base/base-compose.yml
+      service: satellite
+    ports:
+      - 11800
+    depends_on:
+      oap:
+        condition: service_healthy
+
+  provider:
+    extends:
+      file: ../../base/base-compose.yml
+      service: provider
+    ports:
+      - 9090
+    depends_on:
+      satellite:
+        condition: service_healthy
+
+  consumer:
+    extends:
+      file: ../../base/base-compose.yml
+      service: consumer
+    ports:
+      - 9090
+    depends_on:
+      satellite:
+        condition: service_healthy
+      provider:
+        condition: service_healthy
+
+networks:
+  e2e:
\ No newline at end of file
diff --git a/test/e2e/case/native-protocols/e2e.yaml b/test/e2e/case/native-protocols/e2e.yaml
new file mode 100644
index 0000000..fba4c08
--- /dev/null
+++ b/test/e2e/case/native-protocols/e2e.yaml
@@ -0,0 +1,136 @@
+# 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.
+
+# This file is used to show how to write configuration files and can be used to test.
+
+setup:
+  env: compose
+  file: docker-compose.yml
+  timeout: 1200
+  steps:
+    - name: install etcdctl
+      command: |
+        if ! command -v etcdctl &> /dev/null; then
+          mkdir -p /tmp/skywalking-infra-e2e/bin && cd /tmp/skywalking-infra-e2e
+          mkdir -p etcdctl && cd etcdctl
+          utype=$(uname | awk '{print tolower($0)}')
+          suffix=
+          if [ $utype = "darwin" ]
+          then
+              suffix="zip"
+          else
+              suffix="tar.gz"
+          fi
+          curl -kLo etcdctl.$suffix https://github.com/coreos/etcd/releases/download/v3.5.0/etcd-v3.5.0-$utype-amd64.$suffix
+          tar -zxf etcdctl.$suffix --strip=1
+          cp etcdctl ../bin/
+          export PATH="$PATH:/tmp/skywalking-infra-e2e/bin"
+          echo "success to install etcdctl"
+        fi
+
+cleanup:
+  # always never success failure
+  on: always
+
+trigger:
+  action: http
+  interval: 3s
+  times: 5
+  url: http://${consumer_host}:${consumer_9090}/info
+  method: POST
+
+verify:
+  # verify with retry strategy
+  retry:
+    # max retry count
+    count: 20
+    # the interval between two retries, in millisecond.
+    interval: 10000
+  cases:
+    # basic check: service list
+    - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql service ls
+      expected: expected/service.yml
+    # basic check: service metrics
+    - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql metrics linear --name service_sla --service=e2e-service-provider |yq e 'to_entries' -
+      expected: expected/metrics-has-value.yml
+    # basic check: service endpoint
+    - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql endpoint list --keyword=info --service-id=$(swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql service ls|grep -B 1 'provider'|yq e '.[0].id' -)
+      expected: expected/service-endpoint.yml
+    # basic check: service endpoint metrics
+    - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql metrics linear --name endpoint_cpm --endpoint=/info --service=e2e-service-provider |yq e 'to_entries' -
+      expected: expected/metrics-has-value.yml
+
+    # native management: service instance list
+    - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql instance list --service-name=e2e-service-provider
+      expected: expected/service-instance.yml
+
+    # native jvm: service instance jvm metrics
+    - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql metrics linear --name instance_jvm_thread_live_count --instance=provider1 --service=e2e-service-provider |yq e 'to_entries' -
+      expected: expected/metrics-has-value.yml
+
+    # native tracing: trace segment list
+    - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql trace ls
+      expected: expected/traces-list.yml
+    # native tracing: trace detail
+    - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql trace $(swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql trace ls|grep -A 5 '/info'|tail -n1|awk -F ' ' '{print $2}')
+      expected: expected/trace-info-detail.yml
+
+    # native meter: instance meter
+    - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql metrics linear --name meter_jvm_classes_loaded --instance=provider1 --service=e2e-service-provider |yq e 'to_entries' -
+      expected: expected/metrics-has-value.yml
+
+    # native event: event list
+    - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql event list --service=e2e-service-provider --instance=provider1
+      expected: expected/event-list.yml
+
+    # native log: logs list
+    - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql logs list --service-id=$(swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql service ls|grep -B 1 'provider'|yq e '.[0].id' -) --trace-id=$(swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql trace ls|grep -A 5 '/info'|tail -n1|awk -F ' ' '{print $2}')
+      expected: expected/logs-list.yml
+
+    # native profile: create task
+    - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql profile create --service-name=e2e-service-provider --endpoint=/info --start-time=$((($(date +%s)+5)*1000)) --duration=1 --min-duration-threshold=0 --dump-period=10 --max-sampling-count=9
+      expected: expected/profile-create.yml
+    # native profile: sleep to wait agent notices and query profile list
+    - query: sleep 10 && swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql profile list -service-name=e2e-service-provider --endpoint=/info
+      expected: expected/profile-list.yml
+    # native profile: sleep to wait segment report and query profiled segment list
+    - query: |
+        curl -X POST http://${consumer_host}:${consumer_9090}/info > /dev/null;
+        sleep 5;
+        swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql profile segment-list --task-id=$(swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql profile list --service-name=e2e-service-provider --endpoint=/info|yq e '.[0].id' -)
+      expected: expected/profile-segment-list.yml
+    # native profile: query profiled segment
+    - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql profile profiled-segment --segment-id=$(swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql profile segment-list --task-id=$(swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql profile list --service-name=e2e-service-provider --endpoint=/info|yq e '.[0].id' -) | yq e '.[0].segmentid' -)
+      expected: expected/profile-segment-detail.yml
+    # native profile: query profiled segment
+    - query: |
+        segmentid=$(swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql profile segment-list --task-id=$(swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql profile list --service-name=e2e-service-provider --endpoint=/info|yq e '.[0].id' -) |yq e '.[0].segmentid' -);
+        start=$(swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql profile profiled-segment --segment-id=$segmentid|yq e '.spans.[0].starttime' -);
+        end=$(swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql profile profiled-segment --segment-id=$segmentid|yq e '.spans.[0].endtime' -);
+        swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql profile profiled-analyze --segment-id=$segmentid --time-ranges=$(echo $start"-"$end)
+      expected: expected/profile-segment-analyze.yml
+
+    # native CDS: using etcdctl to update trace span limit, "/users" should have more than one span because it need DB save
+    - query: |
+        etcdctl --endpoints http://${etcd_host}:${etcd_2379}/ put /skywalking/configuration-discovery.default.agentConfigurations 'configurations:
+               e2e-service-provider:
+                 agent.span_limit_per_segment: 1' | yq e '{"message": .}' -
+      expected: expected/etcd-put.yml
+    - query: |
+        sleep 5;
+        curl -X POST http://${provider_host}:${provider_9090}/users > /dev/null;
+        sleep 5;
+        swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql trace $(swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql trace list --step=SECOND --service-id=$(swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql service ls|grep -B 1 'provider'|yq e '.[0].id' -)|grep -A 5 "/users"|head -n 6|tail -n1|awk -F ' ' '{print $2}')
+      expected: expected/trace-users-detail.yml
\ No newline at end of file
diff --git a/test/e2e/case/native-protocols/expected/etcd-put.yml b/test/e2e/case/native-protocols/expected/etcd-put.yml
new file mode 100644
index 0000000..3279e72
--- /dev/null
+++ b/test/e2e/case/native-protocols/expected/etcd-put.yml
@@ -0,0 +1,16 @@
+# 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.
+
+message: OK
\ No newline at end of file
diff --git a/test/e2e/case/native-protocols/expected/event-list.yml b/test/e2e/case/native-protocols/expected/event-list.yml
new file mode 100644
index 0000000..8c41d3d
--- /dev/null
+++ b/test/e2e/case/native-protocols/expected/event-list.yml
@@ -0,0 +1,36 @@
+# 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.
+
+events:
+{{- range .events }}
+- uuid: {{ notEmpty .uuid }}
+  source:
+    service: e2e-service-provider
+    serviceinstance: provider1
+    endpoint: ""
+  name: Start
+  type: Normal
+  message: Start Java Application
+  parameters:
+  {{- range .parameters }}
+  {{- if eq .key "OPTS"}}
+    - key: OPTS
+      value: {{ notEmpty .value }}
+  {{- end }}
+  {{- end }}
+  starttime: {{ gt .starttime 0 }}
+  endtime: {{ gt .endtime 0 }}
+{{- end }}
+total: {{ gt .total 0 }}
\ No newline at end of file
diff --git a/test/e2e/case/native-protocols/expected/logs-list.yml b/test/e2e/case/native-protocols/expected/logs-list.yml
new file mode 100644
index 0000000..3294910
--- /dev/null
+++ b/test/e2e/case/native-protocols/expected/logs-list.yml
@@ -0,0 +1,45 @@
+# 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.
+
+logs:
+  {{- range .logs }}
+  - servicename: e2e-service-provider
+    serviceid: {{ b64enc "e2e-service-provider" }}.1
+    serviceinstancename: provider1
+    serviceinstanceid: {{ b64enc "e2e-service-provider" }}.1_{{ b64enc "provider1" }}
+    endpointname: null
+    endpointid: null
+    traceid: {{ notEmpty .traceid }}
+    timestamp: {{ gt .timestamp 0 }}
+    contenttype: TEXT
+    content: |
+      {{ notEmpty .content }}
+    tags:
+    {{- range .tags }}
+    {{- if eq .key "level"}}
+    - key: level
+      value: INFO
+    {{- end }}
+    {{- if eq .key "logger" }}
+    - key: logger
+      value: {{ notEmpty .value }}
+    {{- end }}
+    {{- if eq .key "thread" }}
+    - key: thread
+      value: {{ notEmpty .value }}
+    {{- end }}
+    {{- end }}
+    {{- end }}
+total: {{ gt .total 0 }}
\ No newline at end of file
diff --git a/test/e2e/case/native-protocols/expected/metrics-has-value.yml b/test/e2e/case/native-protocols/expected/metrics-has-value.yml
new file mode 100644
index 0000000..27ae47c
--- /dev/null
+++ b/test/e2e/case/native-protocols/expected/metrics-has-value.yml
@@ -0,0 +1,21 @@
+# 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.
+
+{{- contains . }}
+- key: {{ notEmpty .key }}
+  value: {{ ge .value 0 }}
+- key: {{ notEmpty .key }}
+  value: {{ ge .value 1 }}
+{{- end }}
\ No newline at end of file
diff --git a/test/e2e/case/native-protocols/expected/profile-create.yml b/test/e2e/case/native-protocols/expected/profile-create.yml
new file mode 100644
index 0000000..cec4528
--- /dev/null
+++ b/test/e2e/case/native-protocols/expected/profile-create.yml
@@ -0,0 +1,17 @@
+# 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.
+
+id: {{ notEmpty .id }}
+errorreason: null
\ No newline at end of file
diff --git a/test/e2e/case/native-protocols/expected/profile-list.yml b/test/e2e/case/native-protocols/expected/profile-list.yml
new file mode 100644
index 0000000..cf3459d
--- /dev/null
+++ b/test/e2e/case/native-protocols/expected/profile-list.yml
@@ -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.
+
+{{- range . }}
+- id: {{ notEmpty .id }}
+  serviceid: {{ b64enc "e2e-service-provider" }}.1
+  servicename: ""
+  endpointname: /info
+  starttime: {{ gt .starttime 0 }}
+  duration: 1
+  mindurationthreshold: 0
+  dumpperiod: 10
+  maxsamplingcount: 9
+  logs:
+    {{- range .logs }}
+    - id: {{ notEmpty .id }}
+      instanceid: {{ b64enc "e2e-service-provider" }}.1_{{ b64enc "provider1" }}
+      operationtype: {{ notEmpty .operationtype }}
+      instancename: ""
+      operationtime: {{ gt .operationtime 0 }}
+  {{- end }}
+{{- end }}
\ No newline at end of file
diff --git a/test/e2e/case/native-protocols/expected/profile-segment-analyze.yml b/test/e2e/case/native-protocols/expected/profile-segment-analyze.yml
new file mode 100644
index 0000000..2ce6611
--- /dev/null
+++ b/test/e2e/case/native-protocols/expected/profile-segment-analyze.yml
@@ -0,0 +1,40 @@
+# 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.
+
+tip: null
+trees:
+  {{- range .trees }}
+  - elements:
+    {{- contains .elements }}
+    - id: "{{ notEmpty .id }}"
+      parentid: "{{ notEmpty .parentid }}"
+      codesignature:
+        {{- if eq .codesignature "java.lang.Thread.sleep:-2" }}
+          java.lang.Thread.sleep:-2
+        {{- end }}
+      duration: {{ gt .duration 0 }}
+      durationchildexcluded: {{ gt .durationchildexcluded 0 }}
+      count: {{ gt .count 0 }}
+    - id: "{{ notEmpty .id }}"
+      parentid: "{{ notEmpty .parentid }}"
+      codesignature:
+        {{- if ne .codesignature "java.lang.Thread.sleep:-2" }}
+          {{ notEmpty .codesignature }}
+        {{- end}}
+      duration: {{ ge .duration 0 }}
+      durationchildexcluded: {{ ge .durationchildexcluded 0 }}
+      count: {{ gt .count 0 }}
+    {{- end }}
+  {{- end }}
diff --git a/test/e2e/case/native-protocols/expected/profile-segment-detail.yml b/test/e2e/case/native-protocols/expected/profile-segment-detail.yml
new file mode 100644
index 0000000..dd0a242
--- /dev/null
+++ b/test/e2e/case/native-protocols/expected/profile-segment-detail.yml
@@ -0,0 +1,42 @@
+# 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.
+
+spans:
+{{- range .spans }}
+- spanid: 0
+  parentspanid: -1
+  servicecode: e2e-service-provider
+  serviceinstancename: ""
+  starttime: {{ gt .starttime 0 }}
+  endtime: {{ gt .endtime 0 }}
+  endpointname: /info
+  type: Entry
+  peer: ""
+  component: Tomcat
+  iserror: false
+  layer: Http
+  tags:
+    {{- range .tags }}
+    {{- if eq .key "url" }}
+    - key: url
+      value: {{ notEmpty .value }}
+    {{- end }}
+    {{- if eq .key "http.method" }}
+    - key: http.method
+      value: POST
+    {{- end }}
+    {{- end }}
+  logs: []
+{{- end }}
\ No newline at end of file
diff --git a/test/e2e/case/native-protocols/expected/profile-segment-list.yml b/test/e2e/case/native-protocols/expected/profile-segment-list.yml
new file mode 100644
index 0000000..079c9a0
--- /dev/null
+++ b/test/e2e/case/native-protocols/expected/profile-segment-list.yml
@@ -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.
+
+{{- range . }}
+- segmentid: {{ notEmpty .segmentid }}
+  endpointnames:
+    - /info
+  duration: {{ gt .duration 0 }}
+  start: "{{ notEmpty .start }}"
+  iserror: false
+  traceids:
+  {{- range .traceids }}
+    - {{ notEmpty . }}
+  {{- end }}
+{{- end }}
\ No newline at end of file
diff --git a/test/e2e/case/native-protocols/expected/service-endpoint.yml b/test/e2e/case/native-protocols/expected/service-endpoint.yml
new file mode 100644
index 0000000..76bf688
--- /dev/null
+++ b/test/e2e/case/native-protocols/expected/service-endpoint.yml
@@ -0,0 +1,21 @@
+# 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.
+
+{{- range .}}
+{{- if eq .name "/info" }}
+- id: {{ b64enc "e2e-service-provider" }}.1_{{ b64enc "/info" }}
+  name: /info
+{{- end}}
+{{- end}}
\ No newline at end of file
diff --git a/test/e2e/case/native-protocols/expected/service-instance.yml b/test/e2e/case/native-protocols/expected/service-instance.yml
new file mode 100644
index 0000000..ef74087
--- /dev/null
+++ b/test/e2e/case/native-protocols/expected/service-instance.yml
@@ -0,0 +1,54 @@
+# Licensed to 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. Apache Software Foundation (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.
+
+{{- range .}}
+- id: {{ b64enc "e2e-service-provider" }}.1_{{ b64enc "provider1" }}
+  name: {{ notEmpty .name }}
+  attributes:
+  {{- range .attributes }}
+  {{- if eq .name "OS Name" }}
+  - name: OS Name
+    value: Linux
+  {{- end }}
+  {{- if eq .name "hostname" }}
+  - name: hostname
+    value: {{ notEmpty .value }}
+  {{- end }}
+  {{- if eq .name "Process No." }}
+  - name: Process No.
+    value: "1"
+  {{- end }}
+  {{- if eq .name "Start Time" }}
+  - name: Start Time
+    value: {{ notEmpty .value }}
+  {{- end }}
+  {{- if eq .name "JVM Arguments" }}
+  - name: JVM Arguments
+    value: '{{ notEmpty .value }}'
+  {{- end }}
+  {{- if eq .name "Jar Dependencies" }}
+  - name: Jar Dependencies
+    value: '{{ notEmpty .value }}'
+  {{- end }}
+  {{- if eq .name "ipv4s" }}
+  - name: ipv4s
+    value: {{ notEmpty .value }}
+  {{- end }}
+  {{- end}}
+  language: JAVA
+  instanceuuid: {{ b64enc "e2e-service-provider" }}.1_{{ b64enc "provider1" }}
+{{- end}}
\ No newline at end of file
diff --git a/test/e2e/case/native-protocols/expected/service.yml b/test/e2e/case/native-protocols/expected/service.yml
new file mode 100644
index 0000000..129f9d3
--- /dev/null
+++ b/test/e2e/case/native-protocols/expected/service.yml
@@ -0,0 +1,21 @@
+# 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.
+
+- id: {{ b64enc "e2e-service-provider" }}.1
+  name: e2e-service-provider
+  group: ""
+- id: {{ b64enc "e2e-service-consumer" }}.1
+  name: e2e-service-consumer
+  group: ""
\ No newline at end of file
diff --git a/test/e2e/case/native-protocols/expected/trace-info-detail.yml b/test/e2e/case/native-protocols/expected/trace-info-detail.yml
new file mode 100644
index 0000000..2598ffb
--- /dev/null
+++ b/test/e2e/case/native-protocols/expected/trace-info-detail.yml
@@ -0,0 +1,67 @@
+# 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.
+
+spans:
+  {{- range .spans}}
+  - traceid: {{ notEmpty .traceid }}
+    segmentid: {{ notEmpty .segmentid }}
+    spanid: {{ .spanid }}
+    parentspanid: {{ .parentspanid }}
+    refs:
+      {{- if eq .servicecode "e2e-service-provider" }}
+      {{- range .refs }}
+        - traceid: {{ notEmpty .traceid }}
+          parentsegmentid: {{ notEmpty .parentsegmentid }}
+          parentspanid: 1
+          type: CROSS_PROCESS
+      {{- end }}
+      {{- end }}
+      {{- if eq .servicecode "e2e-service-consumer" }}
+        []
+      {{- end }}
+    servicecode: {{ notEmpty .servicecode }}
+    serviceinstancename: {{ notEmpty .serviceinstancename }}
+    starttime: {{ gt .starttime 0 }}
+    endtime: {{ gt .endtime 0 }}
+    endpointname: /info
+    type: {{ notEmpty .type }}
+    peer:
+    {{- if eq .type "Exit" }}
+      provider:9090
+    {{ else }}
+      ""
+    {{- end }}
+    component:
+    {{- if eq .type "Exit" }}
+      SpringRestTemplate
+    {{- end }}
+    {{- if eq .type "Entry" }}
+      Tomcat
+    {{- end }}
+    iserror: false
+    layer: Http
+    tags:
+      {{- range .tags }}
+      {{- if eq .key "http.method" }}
+      - key: http.method
+        value: POST
+      {{- end }}
+      {{- if eq .key "url" }}
+      - key: url
+        value: {{ notEmpty .value }}
+      {{- end }}
+      {{- end }}
+    logs: []
+  {{- end }}
\ No newline at end of file
diff --git a/test/e2e/case/native-protocols/expected/trace-users-detail.yml b/test/e2e/case/native-protocols/expected/trace-users-detail.yml
new file mode 100644
index 0000000..5129243
--- /dev/null
+++ b/test/e2e/case/native-protocols/expected/trace-users-detail.yml
@@ -0,0 +1,45 @@
+# 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.
+
+spans:
+  {{- range .spans}}
+  - traceid: {{ notEmpty .traceid }}
+    segmentid: {{ notEmpty .segmentid }}
+    spanid: 0
+    parentspanid: -1
+    refs: []
+    servicecode: {{ notEmpty .servicecode }}
+    serviceinstancename: {{ notEmpty .serviceinstancename }}
+    starttime: {{ gt .starttime 0 }}
+    endtime: {{ gt .endtime 0 }}
+    endpointname: /users
+    type: Entry
+    peer: ""
+    component: Tomcat
+    iserror: false
+    layer: Http
+    tags:
+      {{- range .tags }}
+      {{- if eq .key "http.method" }}
+      - key: http.method
+        value: POST
+      {{- end }}
+      {{- if eq .key "url" }}
+      - key: url
+        value: {{ notEmpty .value }}
+      {{- end }}
+      {{- end }}
+    logs: []
+  {{- end }}
\ No newline at end of file
diff --git a/test/e2e/case/native-protocols/expected/traces-list.yml b/test/e2e/case/native-protocols/expected/traces-list.yml
new file mode 100644
index 0000000..823d383
--- /dev/null
+++ b/test/e2e/case/native-protocols/expected/traces-list.yml
@@ -0,0 +1,41 @@
+# 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.
+
+traces:
+{{- range .traces }}
+- segmentid: {{ notEmpty .segmentid }}
+  endpointnames:
+  {{- if eq (index .endpointnames 0) "H2/JDBI/Statement/execute" }}
+    - H2/JDBI/Statement/execute
+  {{- end}}
+  {{- if eq (index .endpointnames 0) "H2/JDBI/Statement/executeQuery" }}
+    - H2/JDBI/Statement/executeQuery
+  {{- end}}
+  {{- if eq (index .endpointnames 0) "H2/JDBI/PreparedStatement/executeQuery" }}
+    - H2/JDBI/PreparedStatement/executeQuery
+  {{- end }}
+  {{- if eq (index .endpointnames 0) "/info" }}
+    - /info
+  {{- end }}
+  {{- if eq (index .endpointnames 0) "/users" }}
+    - /users
+  {{- end }}
+  duration: {{ ge .duration 0 }}
+  start: "{{ notEmpty .start}}"
+  iserror: false
+  traceids:
+    - {{ (index .traceids 0) }}
+{{- end }}
+total: {{ gt .total 0 }}
\ No newline at end of file
diff --git a/test/e2e/case/native-protocols/lal.yaml b/test/e2e/case/native-protocols/lal.yaml
new file mode 100644
index 0000000..aa0922d
--- /dev/null
+++ b/test/e2e/case/native-protocols/lal.yaml
@@ -0,0 +1,28 @@
+# 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.
+
+rules:
+  - name: example
+    dsl: |
+      filter {
+        text {
+          abortOnFailure false // for test purpose, we want to persist all logs
+          regexp $/(?s)(?<timestamp>\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}.\d{3}) \[TID:(?<tid>.+?)] \[(?<thread>.+?)] (?<level>\w{4,}) (?<logger>.{1,36}) (?<msg>.+)/$
+        }
+        extractor {
+        }
+        sink {
+        }
+      }