You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by wu...@apache.org on 2022/05/23 08:58:17 UTC
[skywalking-banyandb] branch main updated: Add OAP E2E test case (#81)
This is an automated email from the ASF dual-hosted git repository.
wusheng pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/skywalking-banyandb.git
The following commit(s) were added to refs/heads/main by this push:
new 081c6b5 Add OAP E2E test case (#81)
081c6b5 is described below
commit 081c6b5f8b9d37489b54ae63a016ee8218f71cc9
Author: Jiajing LU <lu...@gmail.com>
AuthorDate: Mon May 23 16:58:13 2022 +0800
Add OAP E2E test case (#81)
---
.github/workflows/e2e.storage.yml | 84 ++++++++++++++
.licenserc.yaml | 1 +
.../e2e-v2/cases/event/banyandb/docker-compose.yml | 40 +++++++
test/e2e-v2/cases/event/banyandb/e2e.yaml | 37 ++++++
test/e2e-v2/cases/event/event-cases.yaml | 23 ++++
test/e2e-v2/cases/event/expected/events.yml | 37 ++++++
test/e2e-v2/cases/event/expected/report-event.yml | 17 +++
test/e2e-v2/cases/profiling/ebpf/Dockerfile.sqrt | 23 ++++
.../profiling/ebpf/banyandb/docker-compose.yml | 58 ++++++++++
test/e2e-v2/cases/profiling/ebpf/banyandb/e2e.yaml | 37 ++++++
.../e2e-v2/cases/profiling/ebpf/docker-compose.yml | 62 ++++++++++
.../cases/profiling/ebpf/expected/instance.yml | 22 ++++
.../ebpf/expected/process-estimate-scale.yml | 16 +++
.../cases/profiling/ebpf/expected/process.yml | 41 +++++++
.../profiling/ebpf/expected/profiling-analysis.yml | 27 +++++
.../ebpf/expected/profiling-create-prepare.yml | 21 ++++
.../profiling/ebpf/expected/profiling-create.yml | 18 +++
.../ebpf/expected/profiling-schedule-list.yml | 44 +++++++
.../ebpf/expected/profiling-task-list.yml | 30 +++++
.../cases/profiling/ebpf/expected/service.yml | 24 ++++
.../cases/profiling/ebpf/profiling-cases.yaml | 45 ++++++++
test/e2e-v2/cases/profiling/ebpf/sqrt.go | 32 ++++++
.../profiling/trace/banyandb/docker-compose.yml | 63 ++++++++++
.../e2e-v2/cases/profiling/trace/banyandb/e2e.yaml | 37 ++++++
.../profiling/trace/expected/profile-create.yml | 17 +++
.../trace/expected/profile-list-finished.yml | 34 ++++++
.../trace/expected/profile-list-notified.yml | 34 ++++++
.../trace/expected/profile-segment-analyze.yml | 28 +++++
.../trace/expected/profile-segment-detail.yml | 40 +++++++
.../trace/expected/profile-segment-list.yml | 27 +++++
.../profiling/trace/expected/service-endpoint.yml | 19 +++
.../profiling/trace/expected/service-instance.yml | 40 +++++++
.../cases/profiling/trace/expected/service.yml | 24 ++++
.../cases/profiling/trace/expected/traces-list.yml | 26 +++++
.../cases/profiling/trace/profiling-cases.yaml | 76 ++++++++++++
.../cases/storage/banyandb/docker-compose.yml | 77 +++++++++++++
test/e2e-v2/cases/storage/banyandb/e2e.yaml | 47 ++++++++
.../cases/storage/expected/dependency-services.yml | 37 ++++++
test/e2e-v2/cases/storage/expected/event-list.yml | 50 ++++++++
test/e2e-v2/cases/storage/expected/layer.yml | 19 +++
.../cases/storage/expected/metrics-has-value.yml | 19 +++
.../storage/expected/metrics-top-service-sla.yml | 25 ++++
.../cases/storage/expected/service-endpoint.yml | 19 +++
.../cases/storage/expected/service-instance.yml | 40 +++++++
test/e2e-v2/cases/storage/expected/service.yml | 31 +++++
.../cases/storage/expected/trace-info-detail.yml | 68 +++++++++++
.../cases/storage/expected/trace-users-detail.yml | 41 +++++++
test/e2e-v2/cases/storage/expected/traces-list.yml | 28 +++++
test/e2e-v2/cases/storage/storage-cases.yaml | 65 +++++++++++
test/e2e-v2/script/docker-compose/base-compose.yml | 128 +++++++++++++++++++++
test/e2e-v2/script/env | 29 +++++
.../prepare/setup-e2e-shell/install-swctl.sh | 31 +++++
.../script/prepare/setup-e2e-shell/install-yq.sh | 30 +++++
.../script/prepare/setup-e2e-shell/install.sh | 35 ++++++
test/e2e-v2/script/prepare/setup-oap/log4j2.xml | 41 +++++++
55 files changed, 2064 insertions(+)
diff --git a/.github/workflows/e2e.storage.yml b/.github/workflows/e2e.storage.yml
new file mode 100644
index 0000000..2b733f2
--- /dev/null
+++ b/.github/workflows/e2e.storage.yml
@@ -0,0 +1,84 @@
+# 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: OAP-E2E
+
+on:
+ pull_request:
+ schedule:
+ - cron: '0 18 * * *'
+
+env:
+ SW_AGENT_JDK_VERSION: 8
+
+concurrency:
+ group: e2e-storages-${{ github.event.pull_request.number || github.ref }}
+ cancel-in-progress: true
+
+jobs:
+ StoragePlugins:
+ if: (github.event_name == 'schedule' && github.repository == 'apache/skywalking-banyandb') || (github.event_name != 'schedule')
+ name: Storage E2E
+ runs-on: ubuntu-latest
+ timeout-minutes: 90
+ strategy:
+ fail-fast: false
+ matrix:
+ test:
+ - name: BanyanDB
+ config: test/e2e-v2/cases/storage/banyandb/e2e.yaml
+ - name: Trace Profiling BanyanDB
+ config: test/e2e-v2/cases/profiling/trace/banyandb/e2e.yaml
+ - name: eBPF Profiling BanyanDB
+ config: test/e2e-v2/cases/profiling/ebpf/banyandb/e2e.yaml
+ - name: Event BanyanDB
+ config: test/e2e-v2/cases/event/banyandb/e2e.yaml
+ env:
+ TAG: ${{ github.sha }}
+ steps:
+ - name: Install Go
+ uses: actions/setup-go@v2
+ with:
+ go-version: 1.17
+ - name: Install goimports
+ run: go install golang.org/x/tools/cmd/goimports@latest
+ - name: Check out code into the Go module directory
+ uses: actions/checkout@v2
+ with:
+ submodules: true
+ - name: Update dependencies
+ run: GOPROXY=https://proxy.golang.org go mod download
+ - name: Generate codes
+ run: make generate
+ - name: Set up Docker Buildx
+ uses: docker/setup-buildx-action@v1
+ - name: Build docker image
+ run: |
+ make docker || make docker
+ docker image ls
+ - name: ${{ matrix.test.name }}
+ uses: apache/skywalking-infra-e2e@1e522c30ea4467d34dcfe34f14829a7b990932ea
+ with:
+ e2e-file: $GITHUB_WORKSPACE/${{ matrix.test.config }}
+
+ Storage:
+ if: (github.event_name == 'schedule' && github.repository == 'apache/skywalking-banyandb') || (github.event_name != 'schedule')
+ runs-on: ubuntu-latest
+ timeout-minutes: 90
+ needs: [StoragePlugins]
+ steps:
+ - name: To pass or not pass
+ run: echo "Just to make the GitHub merge button green"
\ No newline at end of file
diff --git a/.licenserc.yaml b/.licenserc.yaml
index 3f25016..75d427d 100644
--- a/.licenserc.yaml
+++ b/.licenserc.yaml
@@ -77,6 +77,7 @@ header: # `header` section is configurations for source codes license header.
- '**/*.pb.go'
- '**/*.textproto'
- '**/*.pem'
+ - '**/.gitignore'
comment: on-failure # on what condition license-eye will comment on the pull request, `on-failure`, `always`, `never`.
diff --git a/test/e2e-v2/cases/event/banyandb/docker-compose.yml b/test/e2e-v2/cases/event/banyandb/docker-compose.yml
new file mode 100644
index 0000000..551c406
--- /dev/null
+++ b/test/e2e-v2/cases/event/banyandb/docker-compose.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.
+
+version: '3.8'
+
+services:
+ banyandb:
+ extends:
+ file: ../../../script/docker-compose/base-compose.yml
+ service: banyandb
+ networks:
+ - e2e
+
+ oap:
+ extends:
+ file: ../../../script/docker-compose/base-compose.yml
+ service: oap
+ environment:
+ SW_STORAGE: banyandb
+ depends_on:
+ banyandb:
+ condition: service_healthy
+ ports:
+ - 11800
+ - 12800
+
+networks:
+ e2e:
diff --git a/test/e2e-v2/cases/event/banyandb/e2e.yaml b/test/e2e-v2/cases/event/banyandb/e2e.yaml
new file mode 100644
index 0000000..c957da2
--- /dev/null
+++ b/test/e2e-v2/cases/event/banyandb/e2e.yaml
@@ -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.
+
+# 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: 20m
+ init-system-environment: ../../../script/env
+ steps:
+ - name: set PATH
+ command: export PATH=/tmp/skywalking-infra-e2e/bin:$PATH
+ - name: install yq
+ command: bash test/e2e-v2/script/prepare/setup-e2e-shell/install.sh yq
+ - name: install swctl
+ command: bash test/e2e-v2/script/prepare/setup-e2e-shell/install.sh swctl
+
+verify:
+ retry:
+ count: 20
+ interval: 3s
+ cases:
+ - includes:
+ - ../event-cases.yaml
diff --git a/test/e2e-v2/cases/event/event-cases.yaml b/test/e2e-v2/cases/event/event-cases.yaml
new file mode 100644
index 0000000..69e4673
--- /dev/null
+++ b/test/e2e-v2/cases/event/event-cases.yaml
@@ -0,0 +1,23 @@
+# 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.
+
+ cases:
+ - query: swctl --grpc-addr=${oap_host}:${oap_11800} event report --uuid=abcde --name=Upgrade --service-name=e2e-service --instance-name=e2e-service-instance --endpoint-name='/e2e-endpoint' --message='Upgrade from {fromVersion} to {toVersion}' --layer=GENERAL --start-time=`date +%s`000 --end-time=`date +%s`999 fromVersion=v1 toVersion=v2
+ expected: expected/report-event.yml
+ - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql event ls
+ expected: expected/events.yml
+
diff --git a/test/e2e-v2/cases/event/expected/events.yml b/test/e2e-v2/cases/event/expected/events.yml
new file mode 100644
index 0000000..1a585a1
--- /dev/null
+++ b/test/e2e-v2/cases/event/expected/events.yml
@@ -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.
+
+events:
+ {{- contains .events }}
+ - uuid: abcde
+ source:
+ service: e2e-service
+ serviceinstance: e2e-service-instance
+ endpoint: /e2e-endpoint
+ name: Upgrade
+ type: Normal
+ message: Upgrade from {fromVersion} to {toVersion}
+ parameters:
+ {{- contains .parameters }}
+ - key: fromVersion
+ value: v1
+ - key: toVersion
+ value: v2
+ {{- end }}
+ starttime: {{ gt .starttime 0 }}
+ endtime: {{ gt .endtime 0 }}
+ layer: GENERAL
+ {{- end }}
+
diff --git a/test/e2e-v2/cases/event/expected/report-event.yml b/test/e2e-v2/cases/event/expected/report-event.yml
new file mode 100644
index 0000000..2d38582
--- /dev/null
+++ b/test/e2e-v2/cases/event/expected/report-event.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.
+
+level=info msg="Report the event successfully, whose uuid is abcde\n"
+{}
\ No newline at end of file
diff --git a/test/e2e-v2/cases/profiling/ebpf/Dockerfile.sqrt b/test/e2e-v2/cases/profiling/ebpf/Dockerfile.sqrt
new file mode 100644
index 0000000..432e696
--- /dev/null
+++ b/test/e2e-v2/cases/profiling/ebpf/Dockerfile.sqrt
@@ -0,0 +1,23 @@
+# 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.17
+
+WORKDIR /
+COPY sqrt.go /sqrt.go
+RUN go build -o sqrt sqrt.go
+
+CMD ["/sqrt"]
\ No newline at end of file
diff --git a/test/e2e-v2/cases/profiling/ebpf/banyandb/docker-compose.yml b/test/e2e-v2/cases/profiling/ebpf/banyandb/docker-compose.yml
new file mode 100644
index 0000000..617c1a2
--- /dev/null
+++ b/test/e2e-v2/cases/profiling/ebpf/banyandb/docker-compose.yml
@@ -0,0 +1,58 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+version: '2.1'
+
+services:
+ banyandb:
+ extends:
+ file: ../docker-compose.yml
+ service: banyandb
+ networks:
+ - e2e
+
+ oap:
+ extends:
+ file: ../docker-compose.yml
+ service: oap
+ networks:
+ - e2e
+ environment:
+ SW_STORAGE: banyandb
+ depends_on:
+ banyandb:
+ condition: service_healthy
+ ports:
+ - 12800
+
+ sqrt:
+ extends:
+ file: ../docker-compose.yml
+ service: sqrt
+ networks:
+ - e2e
+
+ rover:
+ extends:
+ file: ../docker-compose.yml
+ service: rover
+ networks:
+ - e2e
+ depends_on:
+ oap:
+ condition: service_healthy
+
+networks:
+ e2e:
\ No newline at end of file
diff --git a/test/e2e-v2/cases/profiling/ebpf/banyandb/e2e.yaml b/test/e2e-v2/cases/profiling/ebpf/banyandb/e2e.yaml
new file mode 100644
index 0000000..7a52a5d
--- /dev/null
+++ b/test/e2e-v2/cases/profiling/ebpf/banyandb/e2e.yaml
@@ -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.
+
+# 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: 20m
+ init-system-environment: ../../../../script/env
+ steps:
+ - name: set PATH
+ command: export PATH=/tmp/skywalking-infra-e2e/bin:$PATH
+ - name: install yq
+ command: bash test/e2e-v2/script/prepare/setup-e2e-shell/install.sh yq
+ - name: install swctl
+ command: bash test/e2e-v2/script/prepare/setup-e2e-shell/install.sh swctl
+
+verify:
+ retry:
+ count: 20
+ interval: 10s
+ cases:
+ - includes:
+ - ../profiling-cases.yaml
\ No newline at end of file
diff --git a/test/e2e-v2/cases/profiling/ebpf/docker-compose.yml b/test/e2e-v2/cases/profiling/ebpf/docker-compose.yml
new file mode 100644
index 0000000..632e7c9
--- /dev/null
+++ b/test/e2e-v2/cases/profiling/ebpf/docker-compose.yml
@@ -0,0 +1,62 @@
+# 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:
+ banyandb:
+ extends:
+ file: ../../../script/docker-compose/base-compose.yml
+ service: banyandb
+
+ oap:
+ extends:
+ file: ../../../script/docker-compose/base-compose.yml
+ service: oap
+
+ sqrt:
+ build:
+ context: .
+ dockerfile: Dockerfile.sqrt
+ networks:
+ - e2e
+
+ rover:
+ image: "ghcr.io/apache/skywalking-rover/skywalking-rover:${SW_ROVER_COMMIT}"
+ networks:
+ - e2e
+ privileged: true
+ pid: host
+ environment:
+ ROVER_HOST_MAPPING: /host
+ ROVER_BACKEND_ADDR: oap:11800
+ ROVER_PROCESS_DISCOVERY_HEARTBEAT_PERIOD: 2s
+ ROVER_PROCESS_DISCOVERY_VM_ACTIVE: "true"
+ ROVER_PROCESS_DISCOVERY_SCAN_MODE: REGEX
+ ROVER_PROCESS_DISCOVERY_REGEX_SCANNER_MATCH_CMD: sqrt
+ ROVER_PROCESS_DISCOVERY_REGEX_SCANNER_LAYER: OS_LINUX
+ ROVER_PROCESS_DISCOVERY_REGEX_SCANNER_SERVICE_NAME: sqrt
+ ROVER_PROCESS_DISCOVERY_REGEX_SCANNER_INSTANCE_NAME: test-instance
+ ROVER_PROCESS_DISCOVERY_REGEX_SCANNER_PROCESS_NAME: "{{.Process.ExeName}}"
+ ROVER_PROCESS_DISCOVERY_REGEX_SCANNER_LABELS: e2e-label1,e2e-label2
+ ROVER_PROFILING_ACTIVE: "true"
+ ROVER_PROFILING_CHECK_INTERVAL: 2s
+ ROVER_PROFILING_FLUSH_INTERVAL: 5s
+ ROVER_PROFILING_TASK_ON_CPU_DUMP_PERIOD: 9ms
+ volumes:
+ - /:/host
+
+networks:
+ e2e:
\ No newline at end of file
diff --git a/test/e2e-v2/cases/profiling/ebpf/expected/instance.yml b/test/e2e-v2/cases/profiling/ebpf/expected/instance.yml
new file mode 100644
index 0000000..5f27650
--- /dev/null
+++ b/test/e2e-v2/cases/profiling/ebpf/expected/instance.yml
@@ -0,0 +1,22 @@
+# 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 . }}
+- id: {{ b64enc "sqrt" }}.1_{{ b64enc "test-instance" }}
+ name: test-instance
+ attributes: []
+ language: UNKNOWN
+ instanceuuid: {{ notEmpty .instanceuuid }}
+{{- end }}
diff --git a/test/e2e-v2/cases/profiling/ebpf/expected/process-estimate-scale.yml b/test/e2e-v2/cases/profiling/ebpf/expected/process-estimate-scale.yml
new file mode 100644
index 0000000..a4bfca0
--- /dev/null
+++ b/test/e2e-v2/cases/profiling/ebpf/expected/process-estimate-scale.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.
+
+1
\ No newline at end of file
diff --git a/test/e2e-v2/cases/profiling/ebpf/expected/process.yml b/test/e2e-v2/cases/profiling/ebpf/expected/process.yml
new file mode 100644
index 0000000..b969631
--- /dev/null
+++ b/test/e2e-v2/cases/profiling/ebpf/expected/process.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.
+
+{{- contains . }}
+- id: {{ notEmpty .id }}
+ name: sqrt
+ serviceid: {{ b64enc "sqrt" }}.1
+ servicename: sqrt
+ instanceid: {{ b64enc "sqrt" }}.1_{{ b64enc "test-instance" }}
+ instancename: test-instance
+ agentid: {{ notEmpty .agentid }}
+ detecttype: VM
+ attributes:
+ {{- contains .attributes }}
+ - name: host_ip
+ value: {{ notEmpty .value }}
+ - name: pid
+ value: {{ notEmpty .value }}
+ - name: command_line
+ value: /sqrt
+ - name: support_ebpf_profiling
+ value: "true"
+ {{- end }}
+ labels:
+ {{- contains .labels }}
+ - e2e-label1
+ - e2e-label2
+ {{- end }}
+{{- end }}
diff --git a/test/e2e-v2/cases/profiling/ebpf/expected/profiling-analysis.yml b/test/e2e-v2/cases/profiling/ebpf/expected/profiling-analysis.yml
new file mode 100644
index 0000000..fdabcce
--- /dev/null
+++ b/test/e2e-v2/cases/profiling/ebpf/expected/profiling-analysis.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.
+
+tip: null
+trees:
+{{- contains .trees }}
+- elements:
+ {{- contains .elements }}
+ - id: "{{ notEmpty .id }}"
+ parentid: "{{ notEmpty .parentid }}"
+ symbol: "main.sqrtInGolang"
+ stacktype: USER_SPACE
+ dumpcount: {{ gt .dumpcount 0 }}
+{{- end }}
+{{- end }}
\ No newline at end of file
diff --git a/test/e2e-v2/cases/profiling/ebpf/expected/profiling-create-prepare.yml b/test/e2e-v2/cases/profiling/ebpf/expected/profiling-create-prepare.yml
new file mode 100644
index 0000000..b1226a3
--- /dev/null
+++ b/test/e2e-v2/cases/profiling/ebpf/expected/profiling-create-prepare.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.
+
+couldprofiling: true
+processlabels:
+ {{- contains .processlabels }}
+ - e2e-label1
+ - e2e-label2
+ {{- end }}
\ No newline at end of file
diff --git a/test/e2e-v2/cases/profiling/ebpf/expected/profiling-create.yml b/test/e2e-v2/cases/profiling/ebpf/expected/profiling-create.yml
new file mode 100644
index 0000000..176b195
--- /dev/null
+++ b/test/e2e-v2/cases/profiling/ebpf/expected/profiling-create.yml
@@ -0,0 +1,18 @@
+# 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.
+
+status: true
+errorreason: null
+id: {{ notEmpty .id }}
\ No newline at end of file
diff --git a/test/e2e-v2/cases/profiling/ebpf/expected/profiling-schedule-list.yml b/test/e2e-v2/cases/profiling/ebpf/expected/profiling-schedule-list.yml
new file mode 100644
index 0000000..728a68d
--- /dev/null
+++ b/test/e2e-v2/cases/profiling/ebpf/expected/profiling-schedule-list.yml
@@ -0,0 +1,44 @@
+# 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 . }}
+- scheduleid: {{ notEmpty .scheduleid }}
+ taskid: {{ notEmpty .taskid }}
+ process:
+ id: {{ notEmpty .process.id }}
+ name: sqrt
+ serviceid: {{ b64enc "sqrt" }}.1
+ servicename: sqrt
+ instanceid: {{ b64enc "sqrt" }}.1_{{ b64enc "test-instance" }}
+ instancename: test-instance
+ agentid: {{ notEmpty .process.agentid }}
+ detecttype: VM
+ attributes:
+ {{- contains .process.attributes }}
+ - name: host_ip
+ value: {{ notEmpty .value }}
+ - name: pid
+ value: {{ notEmpty .value }}
+ - name: command_line
+ value: /sqrt
+ {{- end }}
+ labels:
+ {{- contains .process.labels }}
+ - e2e-label1
+ - e2e-label2
+ {{- end }}
+ starttime: {{ gt .starttime 0 }}
+ endtime: {{ gt .endtime 0 }}
+{{- end }}
diff --git a/test/e2e-v2/cases/profiling/ebpf/expected/profiling-task-list.yml b/test/e2e-v2/cases/profiling/ebpf/expected/profiling-task-list.yml
new file mode 100644
index 0000000..f561c46
--- /dev/null
+++ b/test/e2e-v2/cases/profiling/ebpf/expected/profiling-task-list.yml
@@ -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.
+
+{{- contains . }}
+- taskid: {{ notEmpty .taskid }}
+ serviceid: {{ b64enc "sqrt" }}.1
+ servicename: sqrt
+ processlabels:
+ {{- contains .processlabels }}
+ - e2e-label1
+ - e2e-label2
+ {{- end }}
+ taskstarttime: {{ gt .taskstarttime 0 }}
+ triggertype: FIXED_TIME
+ fixedtriggerduration: 60
+ targettype: ON_CPU
+ createtime: {{ gt .createtime 0 }}
+{{- end }}
\ No newline at end of file
diff --git a/test/e2e-v2/cases/profiling/ebpf/expected/service.yml b/test/e2e-v2/cases/profiling/ebpf/expected/service.yml
new file mode 100644
index 0000000..4c0ee2b
--- /dev/null
+++ b/test/e2e-v2/cases/profiling/ebpf/expected/service.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.
+
+{{- contains . }}
+- id: {{ b64enc "sqrt" }}.1
+ name: sqrt
+ group: ""
+ shortname: sqrt
+ layers:
+ - OS_LINUX
+ normal: true
+{{- end }}
\ No newline at end of file
diff --git a/test/e2e-v2/cases/profiling/ebpf/profiling-cases.yaml b/test/e2e-v2/cases/profiling/ebpf/profiling-cases.yaml
new file mode 100644
index 0000000..902a3be
--- /dev/null
+++ b/test/e2e-v2/cases/profiling/ebpf/profiling-cases.yaml
@@ -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.
+
+# This file is used to show how to write configuration files and can be used to test.
+
+cases:
+ - query: swctl --base-url=http://${oap_host}:${oap_12800}/graphql --display yaml service ls
+ expected: expected/service.yml
+ - query: swctl --base-url=http://${oap_host}:${oap_12800}/graphql --display yaml instance ls --service-name sqrt
+ expected: expected/instance.yml
+ - query: swctl --base-url=http://${oap_host}:${oap_12800}/graphql --display yaml process ls --service-name sqrt --instance-name test-instance
+ expected: expected/process.yml
+ - query: swctl --base-url=http://${oap_host}:${oap_12800}/graphql --display yaml profiling ebpf create prepare --service-name sqrt
+ expected: expected/profiling-create-prepare.yml
+ - query: swctl --base-url=http://${oap_host}:${oap_12800}/graphql --display yaml process estimate scale --service-name sqrt --labels e2e-label1,e2e-label2
+ expected: expected/process-estimate-scale.yml
+ - query: |
+ swctl --base-url=http://${oap_host}:${oap_12800}/graphql --display yaml profiling ebpf create fixed --service-name sqrt --labels e2e-label1,e2e-label2 --duration 1m
+ expected: expected/profiling-create.yml
+ - query: swctl --base-url=http://${oap_host}:${oap_12800}/graphql --display yaml profiling ebpf list --service-name sqrt
+ expected: expected/profiling-task-list.yml
+ - query: |
+ swctl --base-url=http://${oap_host}:${oap_12800}/graphql --display yaml profiling ebpf schedules --task-id=$( \
+ swctl --base-url=http://${oap_host}:${oap_12800}/graphql --display yaml profiling ebpf list --service-name sqrt |yq e '.[0].taskid' -
+ )
+ expected: expected/profiling-schedule-list.yml
+ - query: |
+ taskid=$(swctl --base-url=http://${oap_host}:${oap_12800}/graphql --display yaml profiling ebpf list --service-name sqrt |yq e '.[0].taskid' -)
+ scheduleid=$(swctl --base-url=http://${oap_host}:${oap_12800}/graphql --display yaml profiling ebpf schedules --task-id=$taskid |yq e '.[0].scheduleid' -);
+ start=$(swctl --base-url=http://${oap_host}:${oap_12800}/graphql --display yaml profiling ebpf schedules --task-id=$taskid | yq e '.[0].starttime' -)
+ end=$(swctl --base-url=http://${oap_host}:${oap_12800}/graphql --display yaml profiling ebpf schedules --task-id=$taskid | yq e '.[0].endtime' -)
+ swctl --base-url=http://${oap_host}:${oap_12800}/graphql --display yaml profiling ebpf analysis --schedule-id=$scheduleid --time-ranges=$start-$end
+ expected: expected/profiling-analysis.yml
\ No newline at end of file
diff --git a/test/e2e-v2/cases/profiling/ebpf/sqrt.go b/test/e2e-v2/cases/profiling/ebpf/sqrt.go
new file mode 100644
index 0000000..2e307d1
--- /dev/null
+++ b/test/e2e-v2/cases/profiling/ebpf/sqrt.go
@@ -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 main
+
+import (
+ "math"
+)
+
+//go:noinline
+func sqrtInGolang() {
+ for {
+ math.Sqrt(10000)
+ }
+}
+
+func main() {
+ sqrtInGolang()
+}
diff --git a/test/e2e-v2/cases/profiling/trace/banyandb/docker-compose.yml b/test/e2e-v2/cases/profiling/trace/banyandb/docker-compose.yml
new file mode 100644
index 0000000..d4eb94b
--- /dev/null
+++ b/test/e2e-v2/cases/profiling/trace/banyandb/docker-compose.yml
@@ -0,0 +1,63 @@
+# 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: '3.8'
+
+services:
+ banyandb:
+ extends:
+ file: ../../../../script/docker-compose/base-compose.yml
+ service: banyandb
+ networks:
+ - e2e
+
+ agent:
+ extends:
+ file: ../../../../script/docker-compose/base-compose.yml
+ service: agent
+ networks:
+ - e2e
+
+ provider:
+ extends:
+ file: ../../../../script/docker-compose/base-compose.yml
+ service: provider
+ depends_on:
+ oap:
+ condition: service_healthy
+ agent:
+ condition: service_completed_successfully
+ ports:
+ - 9090
+
+ oap:
+ extends:
+ file: ../../../../script/docker-compose/base-compose.yml
+ service: oap
+ environment:
+ SW_STORAGE: banyandb
+ depends_on:
+ banyandb:
+ condition: service_healthy
+ agent:
+ condition: service_completed_successfully
+ ports:
+ - 12800
+
+networks:
+ e2e:
+
+volumes:
+ sw_agent:
\ No newline at end of file
diff --git a/test/e2e-v2/cases/profiling/trace/banyandb/e2e.yaml b/test/e2e-v2/cases/profiling/trace/banyandb/e2e.yaml
new file mode 100644
index 0000000..8a4fdf3
--- /dev/null
+++ b/test/e2e-v2/cases/profiling/trace/banyandb/e2e.yaml
@@ -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.
+
+# 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: 20m
+ init-system-environment: ../../../../script/env
+ steps:
+ - name: set PATH
+ command: export PATH=/tmp/skywalking-infra-e2e/bin:$PATH
+ - name: install yq
+ command: bash test/e2e-v2/script/prepare/setup-e2e-shell/install.sh yq
+ - name: install swctl
+ command: bash test/e2e-v2/script/prepare/setup-e2e-shell/install.sh swctl
+
+verify:
+ retry:
+ count: 20
+ interval: 3s
+ cases:
+ - includes:
+ - ../profiling-cases.yaml
diff --git a/test/e2e-v2/cases/profiling/trace/expected/profile-create.yml b/test/e2e-v2/cases/profiling/trace/expected/profile-create.yml
new file mode 100644
index 0000000..c6dee76
--- /dev/null
+++ b/test/e2e-v2/cases/profiling/trace/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
diff --git a/test/e2e-v2/cases/profiling/trace/expected/profile-list-finished.yml b/test/e2e-v2/cases/profiling/trace/expected/profile-list-finished.yml
new file mode 100644
index 0000000..25e7f87
--- /dev/null
+++ b/test/e2e-v2/cases/profiling/trace/expected/profile-list-finished.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.
+
+{{- contains . }}
+- id: {{ notEmpty .id }}
+ serviceid: {{ b64enc "e2e-service-provider" }}.1
+ servicename: ""
+ endpointname: POST:/profile/{name}
+ starttime: {{ gt .starttime 0 }}
+ duration: 1
+ mindurationthreshold: 1500
+ dumpperiod: 500
+ maxsamplingcount: 5
+ logs:
+ {{- contains .logs }}
+ - id: {{ notEmpty .id }}
+ instanceid: {{ b64enc "e2e-service-provider" }}.1_{{ b64enc "provider1" }}
+ operationtype: EXECUTION_FINISHED
+ instancename: ""
+ operationtime: {{ gt .operationtime 0 }}
+ {{- end }}
+{{- end }}
diff --git a/test/e2e-v2/cases/profiling/trace/expected/profile-list-notified.yml b/test/e2e-v2/cases/profiling/trace/expected/profile-list-notified.yml
new file mode 100644
index 0000000..faaaa0f
--- /dev/null
+++ b/test/e2e-v2/cases/profiling/trace/expected/profile-list-notified.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.
+
+{{- contains . }}
+- id: {{ notEmpty .id }}
+ serviceid: {{ b64enc "e2e-service-provider" }}.1
+ servicename: ""
+ endpointname: POST:/profile/{name}
+ starttime: {{ gt .starttime 0 }}
+ duration: 1
+ mindurationthreshold: 1500
+ dumpperiod: 500
+ maxsamplingcount: 5
+ logs:
+ {{- contains .logs }}
+ - id: {{ notEmpty .id }}
+ instanceid: {{ b64enc "e2e-service-provider" }}.1_{{ b64enc "provider1" }}
+ operationtype: NOTIFIED
+ instancename: ""
+ operationtime: {{ gt .operationtime 0 }}
+ {{- end }}
+{{- end }}
diff --git a/test/e2e-v2/cases/profiling/trace/expected/profile-segment-analyze.yml b/test/e2e-v2/cases/profiling/trace/expected/profile-segment-analyze.yml
new file mode 100644
index 0000000..683e539
--- /dev/null
+++ b/test/e2e-v2/cases/profiling/trace/expected/profile-segment-analyze.yml
@@ -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.
+
+tip: null
+trees:
+ {{- contains .trees }}
+ - elements:
+ {{- contains .elements }}
+ - id: "{{ notEmpty .id }}"
+ parentid: "{{ notEmpty .parentid }}"
+ codesignature: "test.apache.skywalking.e2e.profile.ProfileController.createAuthor:-1"
+ duration: {{ gt .duration 0 }}
+ durationchildexcluded: 0
+ count: {{ gt .count 0 }}
+ {{- end }}
+ {{- end }}
diff --git a/test/e2e-v2/cases/profiling/trace/expected/profile-segment-detail.yml b/test/e2e-v2/cases/profiling/trace/expected/profile-segment-detail.yml
new file mode 100644
index 0000000..7b22363
--- /dev/null
+++ b/test/e2e-v2/cases/profiling/trace/expected/profile-segment-detail.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.
+
+spans:
+{{- contains .spans }}
+- spanid: 0
+ parentspanid: -1
+ servicecode: e2e-service-provider
+ serviceinstancename: ""
+ starttime: {{ gt .starttime 0 }}
+ endtime: {{ gt .endtime 0 }}
+ endpointname: POST:/profile/{name}
+ type: Entry
+ peer: ""
+ component: SpringMVC
+ iserror: false
+ layer: Http
+ tags:
+ {{- contains .tags }}
+ - key: url
+ value: {{ notEmpty .value }}
+ - key: http.method
+ value: POST
+ - key: http.params
+ value: "e2e=[true]"
+ {{- end }}
+ logs: []
+{{- end }}
diff --git a/test/e2e-v2/cases/profiling/trace/expected/profile-segment-list.yml b/test/e2e-v2/cases/profiling/trace/expected/profile-segment-list.yml
new file mode 100644
index 0000000..a923046
--- /dev/null
+++ b/test/e2e-v2/cases/profiling/trace/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.
+
+{{- contains . }}
+- segmentid: {{ notEmpty .segmentid }}
+ endpointnames:
+ - POST:/profile/{name}
+ duration: {{ gt .duration 0 }}
+ start: "{{ notEmpty .start }}"
+ iserror: false
+ traceids:
+ {{- contains .traceids }}
+ - {{ notEmpty . }}
+ {{- end }}
+{{- end }}
diff --git a/test/e2e-v2/cases/profiling/trace/expected/service-endpoint.yml b/test/e2e-v2/cases/profiling/trace/expected/service-endpoint.yml
new file mode 100644
index 0000000..eb6c743
--- /dev/null
+++ b/test/e2e-v2/cases/profiling/trace/expected/service-endpoint.yml
@@ -0,0 +1,19 @@
+# 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 . }}
+- id: {{ b64enc "e2e-service-provider" }}.1_{{ b64enc "POST:/profile/{name}" }}
+ name: POST:/profile/{name}
+{{- end}}
diff --git a/test/e2e-v2/cases/profiling/trace/expected/service-instance.yml b/test/e2e-v2/cases/profiling/trace/expected/service-instance.yml
new file mode 100644
index 0000000..f32cc2b
--- /dev/null
+++ b/test/e2e-v2/cases/profiling/trace/expected/service-instance.yml
@@ -0,0 +1,40 @@
+# 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.
+
+{{- contains . }}
+- id: {{ b64enc "e2e-service-provider" }}.1_{{ b64enc "provider1" }}
+ name: provider1
+ attributes:
+ {{- contains .attributes }}
+ - name: OS Name
+ value: Linux
+ - name: hostname
+ value: {{ notEmpty .value }}
+ - name: Process No.
+ value: {{ notEmpty .value }}
+ - name: Start Time
+ value: {{ notEmpty .value }}
+ - name: JVM Arguments
+ value: '{{ notEmpty .value }}'
+ - name: Jar Dependencies
+ value: '{{ notEmpty .value }}'
+ - name: ipv4s
+ value: {{ notEmpty .value }}
+ {{- end}}
+ language: JAVA
+ instanceuuid: {{ b64enc "e2e-service-provider" }}.1_{{ b64enc "provider1" }}
+{{- end}}
diff --git a/test/e2e-v2/cases/profiling/trace/expected/service.yml b/test/e2e-v2/cases/profiling/trace/expected/service.yml
new file mode 100644
index 0000000..75d0916
--- /dev/null
+++ b/test/e2e-v2/cases/profiling/trace/expected/service.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.
+
+{{- contains . }}
+- id: {{ b64enc "e2e-service-provider" }}.1
+ name: e2e-service-provider
+ group: ""
+ shortname: e2e-service-provider
+ normal: true
+ layers:
+ - GENERAL
+{{- end }}
diff --git a/test/e2e-v2/cases/profiling/trace/expected/traces-list.yml b/test/e2e-v2/cases/profiling/trace/expected/traces-list.yml
new file mode 100644
index 0000000..196d87a
--- /dev/null
+++ b/test/e2e-v2/cases/profiling/trace/expected/traces-list.yml
@@ -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.
+
+traces:
+{{- contains .traces }}
+- segmentid: {{ notEmpty .segmentid }}
+ endpointnames:
+ - POST:/profile/{name}
+ duration: {{ ge .duration 0 }}
+ start: "{{ notEmpty .start}}"
+ iserror: false
+ traceids:
+ - {{ (index .traceids 0) }}
+{{- end }}
diff --git a/test/e2e-v2/cases/profiling/trace/profiling-cases.yaml b/test/e2e-v2/cases/profiling/trace/profiling-cases.yaml
new file mode 100644
index 0000000..7a395c2
--- /dev/null
+++ b/test/e2e-v2/cases/profiling/trace/profiling-cases.yaml
@@ -0,0 +1,76 @@
+# 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.
+
+ cases:
+ # trace segment list
+ - query: |
+ curl -s -XPOST http://${provider_host}:${provider_9090}/profile/users?e2e=true -d '{"enableProfiling":"false","name":"SkyWalking"}' -H "Content-Type: application/json" > /dev/null;
+ sleep 3;
+ swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql trace ls --service-name=e2e-service-provider
+ expected: expected/traces-list.yml
+ # service list
+ - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql service ls
+ expected: expected/service.yml
+ # 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
+ # service endpoint
+ - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql endpoint list --keyword=profile --service-name=e2e-service-provider
+ expected: expected/service-endpoint.yml
+ # create task
+ - query: |
+ swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql \
+ profiling trace create --service-name=e2e-service-provider \
+ --endpoint-name=POST:/profile/{name} \
+ --start-time=-1 \
+ --duration=1 --min-duration-threshold=1500 \
+ --dump-period=500 --max-sampling-count=5
+ expected: expected/profile-create.yml
+ # profiling list notified: sleep to wait agent notices and query profiling list
+ - query: sleep 3 && swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql profiling trace list -service-name=e2e-service-provider --endpoint-name=POST:/profile/{name}
+ expected: expected/profile-list-notified.yml
+ # profiling list finished:
+ - query: |
+ curl -s -XPOST http://${provider_host}:${provider_9090}/profile/users?e2e=true -d '{"enableProfiling":"true","name":"SkyWalking"}' -H "Content-Type: application/json" > /dev/null;
+ sleep 10;
+ swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql profiling trace list -service-name=e2e-service-provider --endpoint-name=POST:/profile/{name}
+ expected: expected/profile-list-finished.yml
+ # profiled segment list
+ - query: |
+ swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql profiling trace segment-list --task-id=$( \
+ swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql profiling trace list --service-name=e2e-service-provider --endpoint-name=POST:/profile/{name} | yq e '.[0].id' - \
+ )
+ expected: expected/profile-segment-list.yml
+ # profiled segment detail
+ - query: |
+ swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql profiling trace profiled-segment --segment-id=$( \
+ swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql profiling trace segment-list --task-id=$( \
+ swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql profiling trace list --service-name=e2e-service-provider --endpoint-name=POST:/profile/{name} | yq e '.[0].id' - \
+ ) | yq e '.[0].segmentid' - \
+ )
+ expected: expected/profile-segment-detail.yml
+ # query profiled segment analyze
+ - query: |
+ segmentid=$( \
+ swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql profiling trace segment-list --task-id=$( \
+ swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql profiling trace list --service-name=e2e-service-provider --endpoint-name=POST:/profile/{name} | yq e '.[0].id' - \
+ ) | yq e '.[0].segmentid' - \
+ );
+ start=$(swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql profiling trace profiled-segment --segment-id=$segmentid | yq e '.spans[] | select(.spanid == 0).starttime' -);
+ end=$(swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql profiling trace profiled-segment --segment-id=$segmentid | yq e '.spans[] | select(.spanid == 0).endtime' -);
+ swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql profiling trace analysis --segment-id=$segmentid --time-ranges=$(echo $start"-"$end)
+ expected: expected/profile-segment-analyze.yml
diff --git a/test/e2e-v2/cases/storage/banyandb/docker-compose.yml b/test/e2e-v2/cases/storage/banyandb/docker-compose.yml
new file mode 100644
index 0000000..37ee564
--- /dev/null
+++ b/test/e2e-v2/cases/storage/banyandb/docker-compose.yml
@@ -0,0 +1,77 @@
+# 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:
+ banyandb:
+ extends:
+ file: ../../../script/docker-compose/base-compose.yml
+ service: banyandb
+ networks:
+ - e2e
+
+ oap:
+ extends:
+ file: ../../../script/docker-compose/base-compose.yml
+ service: oap
+ environment:
+ SW_STORAGE: banyandb
+ ports:
+ - 12800
+ depends_on:
+ banyandb:
+ condition: service_healthy
+
+ agent:
+ extends:
+ file: ../../../script/docker-compose/base-compose.yml
+ service: agent
+ networks:
+ - e2e
+
+ provider:
+ extends:
+ file: ../../../script/docker-compose/base-compose.yml
+ service: provider
+ ports:
+ - 9090
+ networks:
+ - e2e
+ depends_on:
+ oap:
+ condition: service_healthy
+ agent:
+ condition: service_completed_successfully
+
+ consumer:
+ extends:
+ file: ../../../script/docker-compose/base-compose.yml
+ service: consumer
+ ports:
+ - 9092
+ depends_on:
+ oap:
+ condition: service_healthy
+ provider:
+ condition: service_healthy
+ agent:
+ condition: service_completed_successfully
+
+networks:
+ e2e:
+
+volumes:
+ sw_agent:
\ No newline at end of file
diff --git a/test/e2e-v2/cases/storage/banyandb/e2e.yaml b/test/e2e-v2/cases/storage/banyandb/e2e.yaml
new file mode 100644
index 0000000..7c7bebb
--- /dev/null
+++ b/test/e2e-v2/cases/storage/banyandb/e2e.yaml
@@ -0,0 +1,47 @@
+# 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: 20m
+ init-system-environment: ../../../script/env
+ steps:
+ - name: set PATH
+ command: export PATH=/tmp/skywalking-infra-e2e/bin:$PATH
+ - name: install yq
+ command: bash test/e2e-v2/script/prepare/setup-e2e-shell/install.sh yq
+ - name: install swctl
+ command: bash test/e2e-v2/script/prepare/setup-e2e-shell/install.sh swctl
+
+trigger:
+ action: http
+ interval: 3s
+ times: 10
+ url: http://${consumer_host}:${consumer_9092}/info
+ method: POST
+
+verify:
+ # verify with retry strategy
+ retry:
+ # max retry count
+ count: 20
+ # the interval between two retries, in millisecond.
+ interval: 10s
+ cases:
+ - includes:
+ - ../storage-cases.yaml
\ No newline at end of file
diff --git a/test/e2e-v2/cases/storage/expected/dependency-services.yml b/test/e2e-v2/cases/storage/expected/dependency-services.yml
new file mode 100644
index 0000000..aa6e2fc
--- /dev/null
+++ b/test/e2e-v2/cases/storage/expected/dependency-services.yml
@@ -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.
+
+nodes:
+{{- contains .nodes }}
+- id: {{ b64enc "e2e-service-provider"}}.1
+ name: e2e-service-provider
+ type: Tomcat
+ isreal: true
+- id: {{ b64enc "e2e-service-consumer"}}.1
+ name: e2e-service-consumer
+ type: Tomcat
+ isreal: true
+{{- end }}
+calls:
+{{- contains .calls }}
+- source: {{ b64enc "e2e-service-consumer"}}.1
+ sourcecomponents: []
+ target: {{ b64enc "e2e-service-provider"}}.1
+ targetcomponents: []
+ id: {{ b64enc "e2e-service-consumer"}}.1-{{ b64enc "e2e-service-provider"}}.1
+ detectpoints:
+ - CLIENT
+ - SERVER
+{{- end }}
diff --git a/test/e2e-v2/cases/storage/expected/event-list.yml b/test/e2e-v2/cases/storage/expected/event-list.yml
new file mode 100644
index 0000000..931d86c
--- /dev/null
+++ b/test/e2e-v2/cases/storage/expected/event-list.yml
@@ -0,0 +1,50 @@
+# 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:
+{{- contains .events }}
+- uuid: {{ notEmpty .uuid }}
+ source:
+ service: e2e-service-provider
+ serviceinstance: provider1
+ endpoint: ""
+ name: Start
+ type: Normal
+ message: Start Java Application
+ parameters:
+ {{- contains .parameters }}
+ - key: OPTS
+ value: {{ notEmpty .value }}
+ {{- end }}
+ starttime: {{ gt .starttime 0 }}
+ endtime: {{ gt .endtime 0 }}
+ layer: GENERAL
+- uuid: {{ notEmpty .uuid }}
+ source:
+ service: e2e-service-consumer
+ serviceinstance: consumer1
+ endpoint: ""
+ name: Start
+ type: Normal
+ message: Start Java Application
+ parameters:
+ {{- contains .parameters }}
+ - key: OPTS
+ value: {{ notEmpty .value }}
+ {{- end }}
+ starttime: {{ gt .starttime 0 }}
+ endtime: {{ gt .endtime 0 }}
+ layer: GENERAL
+{{- end }}
diff --git a/test/e2e-v2/cases/storage/expected/layer.yml b/test/e2e-v2/cases/storage/expected/layer.yml
new file mode 100644
index 0000000..fc77de8
--- /dev/null
+++ b/test/e2e-v2/cases/storage/expected/layer.yml
@@ -0,0 +1,19 @@
+# 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 . }}
+- GENERAL
+- VIRTUAL_DATABASE
+{{- end }}
diff --git a/test/e2e-v2/cases/storage/expected/metrics-has-value.yml b/test/e2e-v2/cases/storage/expected/metrics-has-value.yml
new file mode 100644
index 0000000..5359e6d
--- /dev/null
+++ b/test/e2e-v2/cases/storage/expected/metrics-has-value.yml
@@ -0,0 +1,19 @@
+# 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 1 }}
+{{- end }}
diff --git a/test/e2e-v2/cases/storage/expected/metrics-top-service-sla.yml b/test/e2e-v2/cases/storage/expected/metrics-top-service-sla.yml
new file mode 100644
index 0000000..462af34
--- /dev/null
+++ b/test/e2e-v2/cases/storage/expected/metrics-top-service-sla.yml
@@ -0,0 +1,25 @@
+# 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 . }}
+- name: e2e-service-provider
+ id: ""
+ value: '{{- gt .value "0" }}'
+ refid: ~
+- name: e2e-service-consumer
+ id: ""
+ value: '{{- gt .value "0" }}'
+ refid: ~
+{{- end }}
diff --git a/test/e2e-v2/cases/storage/expected/service-endpoint.yml b/test/e2e-v2/cases/storage/expected/service-endpoint.yml
new file mode 100644
index 0000000..d2afb45
--- /dev/null
+++ b/test/e2e-v2/cases/storage/expected/service-endpoint.yml
@@ -0,0 +1,19 @@
+# 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 .}}
+- id: {{ b64enc "e2e-service-provider" }}.1_{{ b64enc "POST:/info" }}
+ name: POST:/info
+{{- end}}
diff --git a/test/e2e-v2/cases/storage/expected/service-instance.yml b/test/e2e-v2/cases/storage/expected/service-instance.yml
new file mode 100644
index 0000000..5f03bc1
--- /dev/null
+++ b/test/e2e-v2/cases/storage/expected/service-instance.yml
@@ -0,0 +1,40 @@
+# 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.
+
+{{- contains .}}
+- id: {{ b64enc "e2e-service-provider" }}.1_{{ b64enc "provider1" }}
+ name: {{ notEmpty .name }}
+ attributes:
+ {{- contains .attributes }}
+ - name: OS Name
+ value: Linux
+ - name: hostname
+ value: {{ notEmpty .value }}
+ - name: Process No.
+ value: "1"
+ - name: Start Time
+ value: {{ notEmpty .value }}
+ - name: JVM Arguments
+ value: '{{ notEmpty .value }}'
+ - name: Jar Dependencies
+ value: '{{ notEmpty .value }}'
+ - name: ipv4s
+ value: {{ notEmpty .value }}
+ {{- end}}
+ language: JAVA
+ instanceuuid: {{ b64enc "e2e-service-provider" }}.1_{{ b64enc "provider1" }}
+{{- end}}
diff --git a/test/e2e-v2/cases/storage/expected/service.yml b/test/e2e-v2/cases/storage/expected/service.yml
new file mode 100644
index 0000000..8b2684e
--- /dev/null
+++ b/test/e2e-v2/cases/storage/expected/service.yml
@@ -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.
+
+{{- contains . }}
+- id: {{ b64enc "e2e-service-provider" }}.1
+ name: e2e-service-provider
+ group: ""
+ shortname: e2e-service-provider
+ normal: true
+ layers:
+ - GENERAL
+- id: {{ b64enc "e2e-service-consumer" }}.1
+ name: e2e-service-consumer
+ group: ""
+ shortname: e2e-service-consumer
+ normal: true
+ layers:
+ - GENERAL
+{{- end }}
diff --git a/test/e2e-v2/cases/storage/expected/trace-info-detail.yml b/test/e2e-v2/cases/storage/expected/trace-info-detail.yml
new file mode 100644
index 0000000..95b9bd9
--- /dev/null
+++ b/test/e2e-v2/cases/storage/expected/trace-info-detail.yml
@@ -0,0 +1,68 @@
+# 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:
+ {{- contains .spans }}
+ - traceid: {{ notEmpty .traceid }}
+ segmentid: {{ notEmpty .segmentid }}
+ spanid: {{ .spanid }}
+ parentspanid: {{ .parentspanid }}
+ refs:
+ {{- if eq .servicecode "e2e-service-provider" }}
+ {{- contains .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:
+ {{- if eq .type "Exit" }}
+ /info
+ {{ else }}
+ POST:/info
+ {{- end }}
+ 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:
+ {{- contains .tags }}
+ - key: http.method
+ value: POST
+ - key: url
+ value: {{ notEmpty .value }}
+ {{- end }}
+ logs: []
+ {{- end }}
diff --git a/test/e2e-v2/cases/storage/expected/trace-users-detail.yml b/test/e2e-v2/cases/storage/expected/trace-users-detail.yml
new file mode 100644
index 0000000..4dfdd6e
--- /dev/null
+++ b/test/e2e-v2/cases/storage/expected/trace-users-detail.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.
+
+spans:
+{{- contains .spans }}
+ - traceid: {{ .traceid }}
+ segmentid: {{ .segmentid }}
+ spanid: {{ .spanid }}
+ parentspanid: {{ .parentspanid }}
+ refs: []
+ servicecode: e2e-service-provider
+ serviceinstancename: provider1
+ starttime: {{ gt .starttime 0 }}
+ endtime: {{ gt .endtime 0 }}
+ endpointname: POST:/users
+ type: Entry
+ peer: ""
+ component: Tomcat
+ iserror: false
+ layer: Http
+ tags:
+ {{- contains .tags }}
+ - key: http.method
+ value: POST
+ - key: url
+ value: {{ notEmpty .value }}
+ {{- end }}
+ logs: []
+ {{- end }}
diff --git a/test/e2e-v2/cases/storage/expected/traces-list.yml b/test/e2e-v2/cases/storage/expected/traces-list.yml
new file mode 100644
index 0000000..9ff6901
--- /dev/null
+++ b/test/e2e-v2/cases/storage/expected/traces-list.yml
@@ -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.
+
+traces:
+{{- contains .traces }}
+- segmentid: {{ notEmpty .segmentid }}
+ endpointnames:
+ {{- contains .endpointnames }}
+ - POST:/info
+ {{- end }}
+ duration: {{ ge .duration 0 }}
+ start: "{{ notEmpty .start}}"
+ iserror: false
+ traceids:
+ - {{ (index .traceids 0) }}
+{{- end }}
diff --git a/test/e2e-v2/cases/storage/storage-cases.yaml b/test/e2e-v2/cases/storage/storage-cases.yaml
new file mode 100644
index 0000000..165de43
--- /dev/null
+++ b/test/e2e-v2/cases/storage/storage-cases.yaml
@@ -0,0 +1,65 @@
+# 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.
+
+cases:
+ # layer list
+ - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql layer ls
+ expected: expected/layer.yml
+ # service list
+ - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql service layer GENERAL
+ expected: expected/service.yml
+ # service metrics
+ - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql metrics linear --name service_sla --service-name=e2e-service-provider | yq e 'to_entries' -
+ expected: expected/metrics-has-value.yml
+ - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql metrics top --name service_sla 5
+ expected: expected/metrics-top-service-sla.yml
+ # service endpoint
+ - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql endpoint list --keyword=info --service-name=e2e-service-provider
+ expected: expected/service-endpoint.yml
+ # service endpoint metrics
+ - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql metrics linear --name endpoint_cpm --endpoint-name=POST:/info --service-name=e2e-service-provider |yq e 'to_entries' -
+ expected: expected/metrics-has-value.yml
+ # dependency service
+ - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql dependency service --service-name="e2e-service-provider"
+ expected: expected/dependency-services.yml
+ # 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
+ # 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-name=provider1 --service-name=e2e-service-provider | yq e 'to_entries' -
+ expected: expected/metrics-has-value.yml
+
+ # trace segment list
+ - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql trace ls --tags http.method=POST
+ 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 \
+ | yq e '.traces | select(.[].endpointnames[0]=="POST:/info") | .[0].traceids[0]' - \
+ )
+ expected: expected/trace-info-detail.yml
+ # native event: event list
+ - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql event list
+ expected: expected/event-list.yml
+
+ - query: |
+ curl -s -XPOST http://${provider_host}:${provider_9090}/users -d '{"id":"123","name":"SinglesBar"}' -H "Content-Type: application/json" > /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 ls --order startTime --service-name "e2e-service-provider" --endpoint-name "POST:/users" \
+ | yq e '.traces[0].traceids[0]' - \
+ )
+ expected: expected/trace-users-detail.yml
\ No newline at end of file
diff --git a/test/e2e-v2/script/docker-compose/base-compose.yml b/test/e2e-v2/script/docker-compose/base-compose.yml
new file mode 100644
index 0000000..7990ed6
--- /dev/null
+++ b/test/e2e-v2/script/docker-compose/base-compose.yml
@@ -0,0 +1,128 @@
+# 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:
+ banyandb:
+ image: "skywalking-banyandb:${TAG}"
+ networks:
+ - e2e
+ expose:
+ - 17912
+ command: standalone --stream-root-path /tmp/stream-data --measure-root-path /tmp/measure-data
+ healthcheck:
+ test: ["CMD", "sh", "-c", "nc -nz 127.0.0.1 17912"]
+ interval: 5s
+ timeout: 60s
+ retries: 120
+
+ agent:
+ image: "ghcr.io/apache/skywalking-java/skywalking-java:${SW_AGENT_JAVA_COMMIT}-java8"
+ networks:
+ - e2e
+ command: cp -r /skywalking/agent/ /skywalking-java-agent/
+ volumes:
+ - sw_agent:/skywalking-java-agent
+
+ oap:
+ image: "ghcr.io/apache/skywalking/oap:${SW_OAP_COMMIT}"
+ expose:
+ - 11800
+ - 12800
+ - 10051
+ - 5005
+ networks:
+ - e2e
+ volumes:
+ - ./../prepare/setup-oap/log4j2.xml:/skywalking/config/log4j2.xml
+ environment:
+ 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_STORAGE_BANYANDB_HOST: banyandb
+ SW_STORAGE_IOTDB_HOST: iotdb
+ SW_STORAGE_IOTDB_SESSIONPOOL_SIZE: 2
+ SW_CONFIG_ETCD_PERIOD: 1
+ SW_CONFIG_ETCD_ENDPOINTS: http://etcd:2379
+ SW_CLUSTER_ETCD_ENDPOINTS: http://etcd:2379
+ healthcheck:
+ test: ["CMD", "bash", "-c", "cat < /dev/null > /dev/tcp/127.0.0.1/11800"]
+ interval: 5s
+ timeout: 60s
+ retries: 120
+
+ ui:
+ image: "ghcr.io/apache/skywalking/ui:${SW_OAP_COMMIT}"
+ expose:
+ - 8080
+ networks:
+ - e2e
+ environment:
+ - SW_OAP_ADDRESS=http://oap:12800
+
+ provider:
+ image: "ghcr.io/apache/skywalking/e2e-service-provider:${SW_AGENT_E2E_SERVICE_PROVIDER_COMMIT}"
+ volumes:
+ - sw_agent:/sw-java-agent
+ networks:
+ - e2e
+ expose:
+ - 9090
+ - 5005
+ environment:
+ JAVA_TOOL_OPTIONS: -javaagent:/sw-java-agent/agent/skywalking-agent.jar
+ SW_AGENT_COLLECTOR_BACKEND_SERVICES: oap:11800
+ SW_LOGGING_OUTPUT: CONSOLE
+ SW_AGENT_NAME: e2e-service-provider
+ SW_AGENT_INSTANCE_NAME: provider1
+ SW_AGENT_COLLECTOR_GET_PROFILE_TASK_INTERVAL: 1
+ SW_AGENT_COLLECTOR_GET_AGENT_DYNAMIC_CONFIG_INTERVAL: 1
+ healthcheck:
+ test: ["CMD", "bash", "-c", "cat < /dev/null > /dev/tcp/127.0.0.1/9090"]
+ interval: 5s
+ timeout: 60s
+ retries: 120
+
+ consumer:
+ image: "ghcr.io/apache/skywalking/e2e-service-consumer:${SW_AGENT_E2E_SERVICE_PROVIDER_COMMIT}"
+ volumes:
+ - sw_agent:/sw-java-agent
+ networks:
+ - e2e
+ expose:
+ - 9092
+ - 5005
+ environment:
+ JAVA_TOOL_OPTIONS: -javaagent:/sw-java-agent/agent/skywalking-agent.jar
+ SW_AGENT_COLLECTOR_BACKEND_SERVICES: oap:11800
+ SW_LOGGING_OUTPUT: CONSOLE
+ PROVIDER_URL: http://provider:9090
+ SW_AGENT_NAME: e2e-service-consumer
+ SW_AGENT_INSTANCE_NAME: consumer1
+ SW_AGENT_COLLECTOR_GET_PROFILE_TASK_INTERVAL: 1
+ SW_AGENT_COLLECTOR_GET_AGENT_DYNAMIC_CONFIG_INTERVAL: 1
+ healthcheck:
+ test: ["CMD", "bash", "-c", "cat < /dev/null > /dev/tcp/127.0.0.1/9092"]
+ interval: 5s
+ timeout: 60s
+ retries: 120
+
+networks:
+ e2e:
+
+volumes:
+ sw_agent:
\ No newline at end of file
diff --git a/test/e2e-v2/script/env b/test/e2e-v2/script/env
new file mode 100644
index 0000000..be6896b
--- /dev/null
+++ b/test/e2e-v2/script/env
@@ -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.
+
+SW_AGENT_JAVA_COMMIT=5bc1d1d1f1d9ce6a4f7fce20e8ecc330bccf47ec
+SW_AGENT_E2E_SERVICE_PROVIDER_COMMIT=34a4553e23530e8255efe6f5a0adff9e69555d64
+SW_AGENT_SATELLITE_COMMIT=1987e1d566ac90f6b58a45fd9bfa27bf8faad635
+SW_AGENT_NGINX_LUA_COMMIT=c3cee4841798a147d83b96a10914d4ac0e11d0aa
+SW_AGENT_NODEJS_COMMIT=2e7560518aff846befd4d6bc815fe5e38c704a11
+SW_AGENT_GO_COMMIT=4af380c2db6243106b0fc650b6003ce3b3eb82a0
+SW_AGENT_PYTHON_COMMIT=c76a6ec51a478ac91abb20ec8f22a99b8d4d6a58
+SW_AGENT_CLIENT_JS_COMMIT=af0565a67d382b683c1dbd94c379b7080db61449
+SW_AGENT_CLIENT_JS_TEST_COMMIT=4f1eb1dcdbde3ec4a38534bf01dded4ab5d2f016
+SW_KUBERNETES_COMMIT_SHA=0f3ec68e5a7e1608cec8688716b848ed15e971e5
+SW_ROVER_COMMIT=90c93c706743aac1f5853b677730edae8cc32a2c
+SW_CTL_COMMIT=219876daf985fd474955834ef0b65013f0890e96
+
+SW_OAP_COMMIT=dc39ce9bb44ed33d9c2bb0d5a054b1dfd5bbd657
diff --git a/test/e2e-v2/script/prepare/setup-e2e-shell/install-swctl.sh b/test/e2e-v2/script/prepare/setup-e2e-shell/install-swctl.sh
new file mode 100644
index 0000000..c58fde4
--- /dev/null
+++ b/test/e2e-v2/script/prepare/setup-e2e-shell/install-swctl.sh
@@ -0,0 +1,31 @@
+#!/usr/bin/env bash
+
+# ----------------------------------------------------------------------------
+# 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.
+# ----------------------------------------------------------------------------
+
+BASE_DIR=$1
+BIN_DIR=$2
+
+if ! command -v swctl &> /dev/null; then
+ mkdir -p $BASE_DIR/swctl && cd $BASE_DIR/swctl
+ curl -kLo skywalking-cli.tar.gz https://github.com/apache/skywalking-cli/archive/${SW_CTL_COMMIT}.tar.gz
+ tar -zxf skywalking-cli.tar.gz --strip=1
+ utype=$(uname | awk '{print tolower($0)}')
+ make $utype-amd64 && mv bin/swctl-*-$utype-amd64 $BIN_DIR/swctl
+fi
diff --git a/test/e2e-v2/script/prepare/setup-e2e-shell/install-yq.sh b/test/e2e-v2/script/prepare/setup-e2e-shell/install-yq.sh
new file mode 100644
index 0000000..28fd299
--- /dev/null
+++ b/test/e2e-v2/script/prepare/setup-e2e-shell/install-yq.sh
@@ -0,0 +1,30 @@
+#!/usr/bin/env bash
+
+# ----------------------------------------------------------------------------
+# 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.
+# ----------------------------------------------------------------------------
+
+BASE_DIR=$1
+BIN_DIR=$2
+
+if ! command -v yq &> /dev/null; then
+ mkdir -p $BASE_DIR/yq && cd $BASE_DIR/yq
+ curl -kLo yq.tar.gz https://github.com/mikefarah/yq/archive/v4.11.1.tar.gz
+ tar -zxf yq.tar.gz --strip=1
+ go install && go build -ldflags -s && cp yq $BIN_DIR/
+fi
\ No newline at end of file
diff --git a/test/e2e-v2/script/prepare/setup-e2e-shell/install.sh b/test/e2e-v2/script/prepare/setup-e2e-shell/install.sh
new file mode 100644
index 0000000..3d440fa
--- /dev/null
+++ b/test/e2e-v2/script/prepare/setup-e2e-shell/install.sh
@@ -0,0 +1,35 @@
+#!/usr/bin/env bash
+
+# ----------------------------------------------------------------------------
+# 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.
+# ----------------------------------------------------------------------------
+
+set -ex
+
+NAME=$1
+CURRENT_DIR="$(cd "$(dirname $0)"; pwd)"
+
+# prepare base dir
+TMP_DIR=/tmp/skywalking-infra-e2e
+BIN_DIR=/usr/local/bin
+mkdir -p $TMP_DIR && cd $TMP_DIR
+
+# execute install
+bash $CURRENT_DIR/install-$NAME.sh $TMP_DIR $BIN_DIR
+
+echo "success to install $NAME"
\ No newline at end of file
diff --git a/test/e2e-v2/script/prepare/setup-oap/log4j2.xml b/test/e2e-v2/script/prepare/setup-oap/log4j2.xml
new file mode 100644
index 0000000..2758ba6
--- /dev/null
+++ b/test/e2e-v2/script/prepare/setup-oap/log4j2.xml
@@ -0,0 +1,41 @@
+<?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="INFO">
+ <Appenders>
+ <Console name="Console" target="SYSTEM_OUT">
+ <PatternLayout charset="UTF-8" pattern="%d %c %L [%t] %-5p %x - %m%n"/>
+ </Console>
+ </Appenders>
+ <Loggers>
+ <logger name="org.eclipse.jetty" level="INFO"/>
+ <logger name="org.apache.zookeeper" level="INFO"/>
+ <logger name="io.grpc.netty" level="INFO"/>
+ <logger name="org.apache.skywalking.oap.meter.analyzer" level="DEBUG"/>
+ <logger name="org.apache.skywalking.oap.server.receiver.istio.telemetry" level="DEBUG"/>
+ <logger name="org.apache.skywalking.oap.server.fetcher.prometheus" level="DEBUG"/>
+ <logger name="org.apache.skywalking.oap.server.receiver.envoy.als" level="DEBUG"/>
+ <logger name="org.apache.skywalking.oap.server.storage.plugin.elasticsearch" level="DEBUG"/>
+ <logger name="org.apache.skywalking.oap.server.core.storage.ttl" level="DEBUG"/>
+ <logger name="org.apache.skywalking.library.elasticsearch" level="DEBUG"/>
+ <Root level="INFO">
+ <AppenderRef ref="Console"/>
+ </Root>
+ </Loggers>
+</Configuration>