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 2021/10/13 15:25:42 UTC
[skywalking] branch master updated: Replace e2e cases to e2e-v2:
PHP (#7919)
This is an automated email from the ASF dual-hosted git repository.
wusheng pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/skywalking.git
The following commit(s) were added to refs/heads/master by this push:
new d6f943b Replace e2e cases to e2e-v2: PHP (#7919)
d6f943b is described below
commit d6f943bbd5d24e7dd1b7ccde46f7d6d6b86787a3
Author: wankai123 <wa...@foxmail.com>
AuthorDate: Wed Oct 13 23:25:19 2021 +0800
Replace e2e cases to e2e-v2: PHP (#7919)
---
.github/workflows/e2e.php.yaml | 7 +-
CHANGES.md | 1 +
test/e2e-v2/cases/php/docker-compose.yml | 52 ++++++++++
test/e2e-v2/cases/php/e2e.yaml | 112 +++++++++++++++++++++
.../cases/php/expected/dependency-instance.yml | 41 ++++++++
.../cases/php/expected/dependency-services-php.yml | 48 +++++++++
.../php/expected/dependency-services-provider.yml | 48 +++++++++
.../cases/php/expected/metrics-has-value.yml | 19 ++++
.../cases/php/expected/service-endpoint-php.yml | 19 ++++
.../php/expected/service-endpoint-provider.yml | 19 ++++
.../cases/php/expected/service-instance-php.yml | 34 +++++++
.../php/expected/service-instance-provider.yml | 40 ++++++++
test/e2e-v2/cases/php/expected/service.yml | 23 +++++
.../cases/php/expected/trace-info-detail.yml | 89 ++++++++++++++++
test/e2e-v2/cases/php/expected/traces-list-php.yml | 27 +++++
.../cases/php/expected/traces-list-provider.yml | 27 +++++
test/e2e-v2/cases/php/index.php | 26 +++++
test/e2e-v2/cases/php/php.ini | 21 ++++
.../skywalking/e2e/controller/UserController.java | 4 +-
19 files changed, 654 insertions(+), 3 deletions(-)
diff --git a/.github/workflows/e2e.php.yaml b/.github/workflows/e2e.php.yaml
index bf24610..5fd2444 100644
--- a/.github/workflows/e2e.php.yaml
+++ b/.github/workflows/e2e.php.yaml
@@ -24,6 +24,9 @@ on:
schedule:
- cron: '0 18 * * *'
+env:
+ SW_AGENT_JDK_VERSION: 8
+
concurrency:
group: e2e-php-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
@@ -42,6 +45,6 @@ jobs:
uses: ./.github/actions/skip
- name: Run E2E Test
if: env.SKIP_CI != 'true'
- uses: ./.github/actions/e2e-test
+ uses: ./.github/actions/infra-e2e-test
with:
- test_class: org.apache.skywalking.e2e.PHPE2E
+ config-file: php/e2e.yaml
diff --git a/CHANGES.md b/CHANGES.md
index 77ac2cb..478564f 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -30,6 +30,7 @@ Release Notes.
* Support `!= null` in OAL engine.
* Add `Message Queue Consuming Count` metric for MQ consuming service and endpoint.
* Add `Message Queue Avg Consuming Latency` metric for MQ consuming service and endpoint.
+* Replace e2e cases to e2e-v2: PHP.
#### UI
diff --git a/test/e2e-v2/cases/php/docker-compose.yml b/test/e2e-v2/cases/php/docker-compose.yml
new file mode 100644
index 0000000..1452d6a
--- /dev/null
+++ b/test/e2e-v2/cases/php/docker-compose.yml
@@ -0,0 +1,52 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+version: '2.1'
+
+services:
+ oap:
+ extends:
+ file: ../../script/docker-compose/base-compose.yml
+ service: oap
+ ports:
+ - 12800
+
+ php:
+ image: skyapm/skywalking-php:v3.3.2
+ networks:
+ - e2e
+ ports:
+ - 8080
+ environment:
+ - SW_AGENT_COLLECTOR_BACKEND_SERVICES=oap:11800
+ depends_on:
+ provider:
+ condition: service_started
+ oap:
+ condition: service_healthy
+ volumes:
+ - ./index.php:/var/www/html/index.php
+ - ./php.ini:/usr/local/etc/php/conf.d/ext-skywalking.ini
+
+ provider:
+ extends:
+ file: ../../script/docker-compose/base-compose.yml
+ service: provider
+ depends_on:
+ oap:
+ condition: service_healthy
+
+networks:
+ e2e:
diff --git a/test/e2e-v2/cases/php/e2e.yaml b/test/e2e-v2/cases/php/e2e.yaml
new file mode 100644
index 0000000..c487a69
--- /dev/null
+++ b/test/e2e-v2/cases/php/e2e.yaml
@@ -0,0 +1,112 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# This file is used to show how to write configuration files and can be used to test.
+
+setup:
+ env: compose
+ file: docker-compose.yml
+ timeout: 1200
+ init-system-environment: ../../script/env
+ steps:
+ - 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
+ - name: install etcdctl
+ command: bash test/e2e-v2/script/prepare/setup-e2e-shell/install.sh etcdctl
+
+trigger:
+ action: http
+ interval: 3s
+ times: 10
+ url: http://${php_host}:${php_8080}/php/info
+ method: POST
+
+verify:
+ # verify with retry strategy
+ retry:
+ # max retry count
+ count: 20
+ # the interval between two retries, in millisecond.
+ interval: 3s
+ cases:
+ # 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=php
+ expected: expected/service-instance-php.yml
+ - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql instance list --service-name=e2e-service-provider
+ expected: expected/service-instance-provider.yml
+ # service endpoint
+ - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql endpoint list --keyword=info --service-name=php
+ expected: expected/service-endpoint-php.yml
+ - 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-provider.yml
+ # trace segment list
+ - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql trace ls --service-name=php
+ expected: expected/traces-list-php.yml
+ - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql trace ls --service-name=e2e-service-provider
+ expected: expected/traces-list-provider.yml
+ # 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]=="/php/info") | .[0].traceids[0]' -
+ )
+ expected: expected/trace-info-detail.yml
+ # dependency service
+ - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql dependency service --service-name=php
+ expected: expected/dependency-services-php.yml
+ - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql dependency service --service-name=e2e-service-provider
+ expected: expected/dependency-services-provider.yml
+ # dependency instance
+ - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql dependency instance --service-name=php --dest-service-name=e2e-service-provider
+ expected: expected/dependency-instance.yml
+ # service metrics
+ - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql metrics linear --name=service_sla --service-name=php |yq e 'to_entries' -
+ expected: expected/metrics-has-value.yml
+ - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql metrics linear --name=service_cpm --service-name=php |yq e 'to_entries' -
+ expected: expected/metrics-has-value.yml
+ - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql metrics linear --name=service_resp_time --service-name=php |yq e 'to_entries' -
+ expected: expected/metrics-has-value.yml
+ - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql metrics linear --name=service_apdex --service-name=php |yq e 'to_entries' -
+ expected: expected/metrics-has-value.yml
+ # service instance metrics
+ - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql metrics linear --name=service_instance_resp_time --instance-name=provider1 --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 linear --name=service_instance_cpm --instance-name=provider1 --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 linear --name=service_instance_sla --instance-name=provider1 --service-name=e2e-service-provider |yq e 'to_entries' -
+ expected: expected/metrics-has-value.yml
+ # service endpoint metrics
+ - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql metrics linear --name=endpoint_cpm --endpoint-name=/php/info --service-name=php |yq e 'to_entries' -
+ expected: expected/metrics-has-value.yml
+ - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql metrics linear --name=endpoint_avg --endpoint-name=/php/info --service-name=php |yq e 'to_entries' -
+ expected: expected/metrics-has-value.yml
+ - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql metrics linear --name=endpoint_sla --endpoint-name=/php/info --service-name=php |yq e 'to_entries' -
+ expected: expected/metrics-has-value.yml
+ # service relation metrics
+ - query: swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql metrics linear --name=service_relation_client_cpm --service-name=php --dest-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 linear --name=service_relation_server_cpm --service-name=php --dest-service-name=e2e-service-provider |yq e 'to_entries' -
+ expected: expected/metrics-has-value.yml
+ # service instance relation metrics
+ - query: |
+ swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql metrics linear --name=service_instance_relation_client_cpm --instance-name=$( \
+ swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql instance list --service-name=php | yq e '.[0].name' - ) \
+ --service-name=php --dest-instance-name=provider1 --dest-service-name=e2e-service-provider |yq e 'to_entries' -
+ expected: expected/metrics-has-value.yml
diff --git a/test/e2e-v2/cases/php/expected/dependency-instance.yml b/test/e2e-v2/cases/php/expected/dependency-instance.yml
new file mode 100644
index 0000000..320103b
--- /dev/null
+++ b/test/e2e-v2/cases/php/expected/dependency-instance.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.
+
+nodes:
+{{- contains .nodes }}
+- id: {{ notEmpty .id }}
+ name: {{ notEmpty .name }}
+ serviceid: {{ b64enc "php" }}.1
+ servicename: php
+ type: ""
+ isreal: true
+- id: {{ b64enc "e2e-service-provider" }}.1_{{ b64enc "provider1" }}
+ name: provider1
+ serviceid: {{ b64enc "e2e-service-provider" }}.1
+ servicename: e2e-service-provider
+ type: Tomcat
+ isreal: true
+{{- end }}
+calls:
+{{- contains .calls }}
+- source: {{ notEmpty .source }}
+ sourcecomponents: []
+ target: {{ b64enc "e2e-service-provider" }}.1_{{ b64enc "provider1" }}
+ targetcomponents: []
+ id: {{ notEmpty .id }}
+ detectpoints:
+ - CLIENT
+ - SERVER
+{{- end }}
diff --git a/test/e2e-v2/cases/php/expected/dependency-services-php.yml b/test/e2e-v2/cases/php/expected/dependency-services-php.yml
new file mode 100644
index 0000000..a8938a9
--- /dev/null
+++ b/test/e2e-v2/cases/php/expected/dependency-services-php.yml
@@ -0,0 +1,48 @@
+# 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 "User" }}.0
+ name: User
+ type: USER
+ isreal: false
+- id: {{ b64enc "e2e-service-provider" }}.1
+ name: e2e-service-provider
+ type: Tomcat
+ isreal: true
+- id: {{ b64enc "php" }}.1
+ name: php
+ type: http
+ isreal: true
+{{- end }}
+calls:
+{{- contains .calls }}
+- source: {{ b64enc "php" }}.1
+ sourcecomponents: []
+ target: {{ b64enc "e2e-service-provider" }}.1
+ targetcomponents: []
+ id: {{ b64enc "php" }}.1-{{ b64enc "e2e-service-provider" }}.1
+ detectpoints:
+ - CLIENT
+ - SERVER
+- source: {{ b64enc "User" }}.0
+ sourcecomponents: []
+ target: {{ b64enc "php" }}.1
+ targetcomponents: []
+ id: {{ b64enc "User" }}.0-{{ b64enc "php" }}.1
+ detectpoints:
+ - SERVER
+{{- end }}
diff --git a/test/e2e-v2/cases/php/expected/dependency-services-provider.yml b/test/e2e-v2/cases/php/expected/dependency-services-provider.yml
new file mode 100644
index 0000000..fd2f901
--- /dev/null
+++ b/test/e2e-v2/cases/php/expected/dependency-services-provider.yml
@@ -0,0 +1,48 @@
+# 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 "localhost:-1" }}.0
+ name: localhost:-1
+ type: H2
+ isreal: false
+- id: {{ b64enc "php" }}.1
+ name: php
+ type: http
+ isreal: true
+{{- end }}
+calls:
+{{- contains .calls }}
+- source: {{ b64enc "php" }}.1
+ sourcecomponents: []
+ target: {{ b64enc "e2e-service-provider" }}.1
+ targetcomponents: []
+ id: {{ b64enc "php" }}.1-{{ b64enc "e2e-service-provider" }}.1
+ detectpoints:
+ - CLIENT
+ - SERVER
+- source: {{ b64enc "e2e-service-provider" }}.1
+ sourcecomponents: []
+ target: {{ b64enc "localhost:-1"}}.0
+ targetcomponents: []
+ id: {{ b64enc "e2e-service-provider" }}.1-{{ b64enc "localhost:-1"}}.0
+ detectpoints:
+ - CLIENT
+{{- end }}
diff --git a/test/e2e-v2/cases/php/expected/metrics-has-value.yml b/test/e2e-v2/cases/php/expected/metrics-has-value.yml
new file mode 100644
index 0000000..87e3c2d
--- /dev/null
+++ b/test/e2e-v2/cases/php/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 2 }}
+{{- end }}
diff --git a/test/e2e-v2/cases/php/expected/service-endpoint-php.yml b/test/e2e-v2/cases/php/expected/service-endpoint-php.yml
new file mode 100644
index 0000000..91e5011
--- /dev/null
+++ b/test/e2e-v2/cases/php/expected/service-endpoint-php.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 "php" }}.1_{{ b64enc "/php/info" }}
+ name: /php/info
+{{- end}}
diff --git a/test/e2e-v2/cases/php/expected/service-endpoint-provider.yml b/test/e2e-v2/cases/php/expected/service-endpoint-provider.yml
new file mode 100644
index 0000000..d5f6f3f
--- /dev/null
+++ b/test/e2e-v2/cases/php/expected/service-endpoint-provider.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 "GET:/info" }}
+ name: GET:/info
+{{- end}}
diff --git a/test/e2e-v2/cases/php/expected/service-instance-php.yml b/test/e2e-v2/cases/php/expected/service-instance-php.yml
new file mode 100644
index 0000000..0f3f376
--- /dev/null
+++ b/test/e2e-v2/cases/php/expected/service-instance-php.yml
@@ -0,0 +1,34 @@
+# 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. shadow
+
+{{- contains .}}
+- id: {{ notEmpty .id }}
+ name: {{ notEmpty .name }}
+ attributes:
+ {{- contains .attributes }}
+ - name: os_name
+ value: linux
+ - name: host_name
+ value: {{ notEmpty .value }}
+ - name: process_no
+ value: {{ notEmpty .value }}
+ - name: ipv4s
+ value: {{ notEmpty .value }}
+ {{- end}}
+ language: PHP
+ instanceuuid: {{ notEmpty .instanceuuid }}
+{{- end}}
diff --git a/test/e2e-v2/cases/php/expected/service-instance-provider.yml b/test/e2e-v2/cases/php/expected/service-instance-provider.yml
new file mode 100644
index 0000000..f9296e4
--- /dev/null
+++ b/test/e2e-v2/cases/php/expected/service-instance-provider.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: "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}}
\ No newline at end of file
diff --git a/test/e2e-v2/cases/php/expected/service.yml b/test/e2e-v2/cases/php/expected/service.yml
new file mode 100644
index 0000000..61d110d
--- /dev/null
+++ b/test/e2e-v2/cases/php/expected/service.yml
@@ -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.
+
+{{- contains . }}
+- id: {{ b64enc "e2e-service-provider" }}.1
+ name: e2e-service-provider
+ group: ""
+- id: {{ b64enc "php" }}.1
+ name: php
+ group: ""
+{{- end }}
diff --git a/test/e2e-v2/cases/php/expected/trace-info-detail.yml b/test/e2e-v2/cases/php/expected/trace-info-detail.yml
new file mode 100644
index 0000000..a551a06
--- /dev/null
+++ b/test/e2e-v2/cases/php/expected/trace-info-detail.yml
@@ -0,0 +1,89 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+spans:
+ {{- contains .spans }}
+ - traceid: {{ .traceid }}
+ segmentid: {{ .segmentid }}
+ spanid: {{ .spanid }}
+ parentspanid: {{ .parentspanid }}
+ refs: []
+ servicecode: php
+ serviceinstancename: {{ notEmpty .serviceinstancename }}
+ starttime: {{ gt .starttime 0 }}
+ endtime: {{ gt .endtime 0 }}
+ endpointname: /php/info
+ type: Entry
+ peer: {{ notEmpty .peer }}
+ component: http
+ iserror: false
+ layer: Http
+ tags:
+ {{- contains .tags }}
+ - key: url
+ value: {{ notEmpty .value }}
+ {{- end }}
+ logs: []
+ - traceid: {{ notEmpty .traceid }}
+ segmentid: {{ .segmentid }}
+ spanid: {{ .spanid }}
+ parentspanid: {{ .parentspanid }}
+ refs: []
+ servicecode: php
+ serviceinstancename: {{ notEmpty .serviceinstancename }}
+ starttime: {{ gt .starttime 0 }}
+ endtime: {{ gt .endtime 0 }}
+ endpointname: /info
+ type: Exit
+ peer: provider:9090
+ component: HttpClient
+ iserror: false
+ layer: Http
+ tags:
+ {{- contains .tags }}
+ - key: url
+ value: {{ notEmpty .value }}
+ {{- end }}
+ logs: []
+ - traceid: {{ notEmpty .traceid }}
+ segmentid: {{ .segmentid }}
+ spanid: {{ .spanid }}
+ parentspanid: {{ .parentspanid }}
+ refs:
+ {{- contains .refs }}
+ - traceid: {{ notEmpty .traceid }}
+ parentsegmentid: {{ .parentsegmentid }}
+ parentspanid: 1
+ type: CROSS_PROCESS
+ {{- end }}
+ servicecode: e2e-service-provider
+ serviceinstancename: provider1
+ starttime: {{ gt .starttime 0 }}
+ endtime: {{ gt .endtime 0 }}
+ endpointname: GET:/info
+ type: Entry
+ peer: ""
+ component: Tomcat
+ iserror: false
+ layer: Http
+ tags:
+ {{- contains .tags }}
+ - key: http.method
+ value: GET
+ - key: url
+ value: {{ notEmpty .value }}
+ {{- end }}
+ logs: []
+ {{- end }}
diff --git a/test/e2e-v2/cases/php/expected/traces-list-php.yml b/test/e2e-v2/cases/php/expected/traces-list-php.yml
new file mode 100644
index 0000000..0b4a6f4
--- /dev/null
+++ b/test/e2e-v2/cases/php/expected/traces-list-php.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.
+
+traces:
+{{- contains .traces }}
+- segmentid: {{ notEmpty .segmentid }}
+ endpointnames:
+ - /php/info
+ duration: {{ ge .duration 0 }}
+ start: "{{ notEmpty .start}}"
+ iserror: false
+ traceids:
+ - {{ (index .traceids 0) }}
+{{- end }}
+total: {{ gt .total 0 }}
diff --git a/test/e2e-v2/cases/php/expected/traces-list-provider.yml b/test/e2e-v2/cases/php/expected/traces-list-provider.yml
new file mode 100644
index 0000000..3d14e71
--- /dev/null
+++ b/test/e2e-v2/cases/php/expected/traces-list-provider.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.
+
+traces:
+{{- contains .traces }}
+- segmentid: {{ notEmpty .segmentid }}
+ endpointnames:
+ - GET:/info
+ duration: {{ ge .duration 0 }}
+ start: "{{ notEmpty .start}}"
+ iserror: false
+ traceids:
+ - {{ (index .traceids 0) }}
+{{- end }}
+total: {{ gt .total 0 }}
diff --git a/test/e2e-v2/cases/php/index.php b/test/e2e-v2/cases/php/index.php
new file mode 100644
index 0000000..764c01f
--- /dev/null
+++ b/test/e2e-v2/cases/php/index.php
@@ -0,0 +1,26 @@
+<?php
+# 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.
+
+usleep(500000);
+$uri = $_SERVER['REQUEST_URI'];
+
+if($uri == '/php/info') {
+ $ch = curl_init();
+ curl_setopt($ch, CURLOPT_URL, "http://provider:9090/info");
+ curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
+ $output = curl_exec($ch);
+ curl_close($ch);
+}
diff --git a/test/e2e-v2/cases/php/php.ini b/test/e2e-v2/cases/php/php.ini
new file mode 100644
index 0000000..f5b61b1
--- /dev/null
+++ b/test/e2e-v2/cases/php/php.ini
@@ -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.
+
+[skywalking]
+extension=skywalking.so
+skywalking.app_code = php
+skywalking.enable = 1
+skywalking.version = 8
+skywalking.sock_path = /tmp/sky-agent.sock
diff --git a/test/e2e-v2/java-test-service/e2e-service-provider/src/main/java/org/apache/skywalking/e2e/controller/UserController.java b/test/e2e-v2/java-test-service/e2e-service-provider/src/main/java/org/apache/skywalking/e2e/controller/UserController.java
index 2a84865..c7a3105 100644
--- a/test/e2e-v2/java-test-service/e2e-service-provider/src/main/java/org/apache/skywalking/e2e/controller/UserController.java
+++ b/test/e2e-v2/java-test-service/e2e-service-provider/src/main/java/org/apache/skywalking/e2e/controller/UserController.java
@@ -24,6 +24,8 @@ import org.apache.skywalking.e2e.User;
import org.apache.skywalking.e2e.UserRepo;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import org.slf4j.LoggerFactory;
@@ -39,7 +41,7 @@ public class UserController {
private final int sleepMin = 500;
private final int sleepMax = 1000;
- @PostMapping("/info")
+ @RequestMapping(value = "/info", method = {RequestMethod.POST, RequestMethod.GET})
public String info() throws InterruptedException {
Thread.sleep(randomSleepLong(sleepMin, sleepMax));
LOGBACK_LOGGER.info("logback message==> now: {}", System.currentTimeMillis());