diff --git a/.github/workflows/e2e.php.yaml b/.github/workflows/e2e.php.yaml index bf24610eebf39d049f472ffc27eb765883204e98..5fd2444ea2687b41482468ed17699905d2ea4b16 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 77ac2cbbf68759d8b7d9280883830eb5f5b53729..478564fd7b751b1a388515c7acf73c0711d11d7a 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 0000000000000000000000000000000000000000..1452d6aa668870a1aae467125e29c9bbb26b0582 --- /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 0000000000000000000000000000000000000000..c487a69a75dd202fa64d2db4c35a872ebb4e454d --- /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 0000000000000000000000000000000000000000..320103bf1e0f769eb7151b2edee67ea654c6ddf0 --- /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 0000000000000000000000000000000000000000..a8938a9a2612d43581eb7f259862c0369084d720 --- /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 0000000000000000000000000000000000000000..fd2f90132743861d0589298284c12ebfe8baa152 --- /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 0000000000000000000000000000000000000000..87e3c2da20bc3fd2f87aa2f61612705475c95f2b --- /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 0000000000000000000000000000000000000000..91e5011cb615640ae3cf25a361e857a6c6d1e72f --- /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 0000000000000000000000000000000000000000..d5f6f3f92643f1fd326ede8fc9648811c8fdc192 --- /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 0000000000000000000000000000000000000000..0f3f376ba71bfe2ac8b86c506fbad39b751c4187 --- /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 0000000000000000000000000000000000000000..f9296e43bba0d764880bd6214de8f1f794fd679d --- /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 0000000000000000000000000000000000000000..61d110df364281c0489fc36873d9ac983ffc1a74 --- /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 0000000000000000000000000000000000000000..a551a0636a14e10223e8ee79b368a829ffab61e2 --- /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 0000000000000000000000000000000000000000..0b4a6f4df0c57ecfb24edd2a454afbd62d849d21 --- /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 0000000000000000000000000000000000000000..3d14e718758238839ef14d7c3add6aa48955b02c --- /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 0000000000000000000000000000000000000000..764c01fc92afec6923a5df80f0b9a6e51f14e6e8 --- /dev/null +++ b/test/e2e-v2/cases/php/index.php @@ -0,0 +1,26 @@ + now: {}", System.currentTimeMillis());