Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
润土的好友猹
SkyWalking
提交
954eede0
S
SkyWalking
项目概览
润土的好友猹
/
SkyWalking
与 Fork 源项目一致
Fork自
apache / SkyWalking
通知
9
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
S
SkyWalking
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
未验证
提交
954eede0
编写于
3月 23, 2020
作者:
何
何延龙
提交者:
GitHub
3月 23, 2020
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add PHP module support to e2e test (#4547)
上级
2ec8e2ad
变更
14
隐藏空白更改
内联
并排
Showing
14 changed file
with
718 addition
and
0 deletion
+718
-0
.github/workflows/e2e.php.yaml
.github/workflows/e2e.php.yaml
+52
-0
test/e2e/e2e-test/docker/php/docker-compose.yml
test/e2e/e2e-test/docker/php/docker-compose.yml
+82
-0
test/e2e/e2e-test/docker/php/index.php
test/e2e/e2e-test/docker/php/index.php
+25
-0
test/e2e/e2e-test/docker/php/php-shadow.ini
test/e2e/e2e-test/docker/php/php-shadow.ini
+21
-0
test/e2e/e2e-test/docker/php/php.ini
test/e2e/e2e-test/docker/php/php.ini
+21
-0
test/e2e/e2e-test/src/test/java/org/apache/skywalking/e2e/PHPE2E.java
...-test/src/test/java/org/apache/skywalking/e2e/PHPE2E.java
+293
-0
test/e2e/e2e-test/src/test/resources/expected/php/endpoints.yml
...2e/e2e-test/src/test/resources/expected/php/endpoints.yml
+23
-0
test/e2e/e2e-test/src/test/resources/expected/php/instances.yml
...2e/e2e-test/src/test/resources/expected/php/instances.yml
+27
-0
test/e2e/e2e-test/src/test/resources/expected/php/serviceInstanceTopo.yml
...t/src/test/resources/expected/php/serviceInstanceTopo.yml
+34
-0
test/e2e/e2e-test/src/test/resources/expected/php/services.yml
...e2e/e2e-test/src/test/resources/expected/php/services.yml
+20
-0
test/e2e/e2e-test/src/test/resources/expected/php/shadowEndpoints.yml
...-test/src/test/resources/expected/php/shadowEndpoints.yml
+21
-0
test/e2e/e2e-test/src/test/resources/expected/php/shadowInstances.yml
...-test/src/test/resources/expected/php/shadowInstances.yml
+27
-0
test/e2e/e2e-test/src/test/resources/expected/php/topo.yml
test/e2e/e2e-test/src/test/resources/expected/php/topo.yml
+40
-0
test/e2e/e2e-test/src/test/resources/expected/php/traces.yml
test/e2e/e2e-test/src/test/resources/expected/php/traces.yml
+32
-0
未找到文件。
.github/workflows/e2e.php.yaml
0 → 100644
浏览文件 @
954eede0
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
name
:
E2E
on
:
pull_request
:
push
:
branches
:
-
master
tags
:
-
'
v*'
env
:
SKIP_TEST
:
true
SW_AGENT_JDK_VERSION
:
8
jobs
:
PHPAgent
:
name
:
PHP
runs-on
:
ubuntu-latest
steps
:
-
uses
:
actions/checkout@v2
-
name
:
checkout submodules
shell
:
bash
run
:
|
git submodule sync --recursive
git -c protocol.version=2 submodule update --init --force --recursive --depth=1
-
name
:
Compile and Build
run
:
make docker
-
name
:
Copy dist package
run
:
cp -R dist test/e2e/
-
name
:
PHP
run
:
./mvnw --batch-mode -f test/e2e/pom.xml -am -DfailIfNoTests=false verify -Dit.test=org.apache.skywalking.e2e.PHPE2E
-
uses
:
actions/upload-artifact@v1
if
:
failure()
with
:
name
:
logs
path
:
logs
test/e2e/e2e-test/docker/php/docker-compose.yml
0 → 100644
浏览文件 @
954eede0
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
version
:
'
2.1'
services
:
oap
:
image
:
skywalking/oap:latest
expose
:
-
11800
-
12800
networks
:
-
e2e
restart
:
on-failure
healthcheck
:
test
:
[
"
CMD"
,
"
bash"
,
"
-c"
,
"
cat
<
/dev/null
>
/dev/tcp/127.0.0.1/11800"
]
interval
:
5s
timeout
:
60s
retries
:
120
php-shadow
:
image
:
skyapm/skywalking-php:v3.2.8
networks
:
-
e2e
expose
:
-
8080
environment
:
-
SW_AGENT_COLLECTOR_BACKEND_SERVICES=oap:11800
depends_on
:
oap
:
condition
:
service_healthy
volumes
:
-
./index.php:/var/www/html/index.php
-
./php-shadow.ini:/usr/local/etc/php/conf.d/ext-skywalking.ini
php
:
image
:
skyapm/skywalking-php:v3.2.8
networks
:
-
e2e
expose
:
-
8080
environment
:
-
SW_AGENT_COLLECTOR_BACKEND_SERVICES=oap:11800
depends_on
:
php-shadow
:
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
ui
:
image
:
skywalking/ui:latest
expose
:
-
8080
networks
:
-
e2e
environment
:
-
SW_OAP_ADDRESS=oap:12800
depends_on
:
php
:
condition
:
service_started
php-shadow
:
condition
:
service_started
oap
:
condition
:
service_healthy
networks
:
e2e
:
\ No newline at end of file
test/e2e/e2e-test/docker/php/index.php
0 → 100644
浏览文件 @
954eede0
<?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.
$uri
=
$_SERVER
[
'REQUEST_URI'
];
if
(
$uri
==
'/php/info'
)
{
$ch
=
curl_init
();
curl_setopt
(
$ch
,
CURLOPT_URL
,
"http://php-shadow:8080/php/call"
);
curl_setopt
(
$ch
,
CURLOPT_RETURNTRANSFER
,
1
);
$output
=
curl_exec
(
$ch
);
curl_close
(
$ch
);
}
test/e2e/e2e-test/docker/php/php-shadow.ini
0 → 100644
浏览文件 @
954eede0
; 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-shadow
skywalking.enable
=
1
skywalking.version
=
6
skywalking.sock_path
=
/tmp/sky-agent.sock
\ No newline at end of file
test/e2e/e2e-test/docker/php/php.ini
0 → 100644
浏览文件 @
954eede0
; 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
=
6
skywalking.sock_path
=
/tmp/sky-agent.sock
\ No newline at end of file
test/e2e/e2e-test/src/test/java/org/apache/skywalking/e2e/PHPE2E.java
0 → 100644
浏览文件 @
954eede0
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package
org.apache.skywalking.e2e
;
import
java.util.List
;
import
java.net.URL
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.skywalking.e2e.annotation.ContainerHostAndPort
;
import
org.apache.skywalking.e2e.annotation.DockerCompose
;
import
org.apache.skywalking.e2e.base.SkyWalkingE2E
;
import
org.apache.skywalking.e2e.base.SkyWalkingTestAdapter
;
import
org.apache.skywalking.e2e.common.HostAndPort
;
import
org.apache.skywalking.e2e.metrics.AtLeastOneOfMetricsMatcher
;
import
org.apache.skywalking.e2e.metrics.Metrics
;
import
org.apache.skywalking.e2e.metrics.MetricsQuery
;
import
org.apache.skywalking.e2e.metrics.MetricsValueMatcher
;
import
org.apache.skywalking.e2e.retryable.RetryableTest
;
import
org.apache.skywalking.e2e.service.Service
;
import
org.apache.skywalking.e2e.service.ServicesMatcher
;
import
org.apache.skywalking.e2e.service.ServicesQuery
;
import
org.apache.skywalking.e2e.service.endpoint.Endpoint
;
import
org.apache.skywalking.e2e.service.endpoint.EndpointQuery
;
import
org.apache.skywalking.e2e.service.endpoint.Endpoints
;
import
org.apache.skywalking.e2e.service.endpoint.EndpointsMatcher
;
import
org.apache.skywalking.e2e.service.instance.Instance
;
import
org.apache.skywalking.e2e.service.instance.Instances
;
import
org.apache.skywalking.e2e.service.instance.InstancesMatcher
;
import
org.apache.skywalking.e2e.service.instance.InstancesQuery
;
import
org.apache.skywalking.e2e.topo.Call
;
import
org.apache.skywalking.e2e.topo.ServiceInstanceTopology
;
import
org.apache.skywalking.e2e.topo.ServiceInstanceTopologyMatcher
;
import
org.apache.skywalking.e2e.topo.ServiceInstanceTopologyQuery
;
import
org.apache.skywalking.e2e.topo.Topology
;
import
org.apache.skywalking.e2e.topo.TopoMatcher
;
import
org.apache.skywalking.e2e.topo.TopoQuery
;
import
org.apache.skywalking.e2e.trace.Trace
;
import
org.apache.skywalking.e2e.trace.TracesMatcher
;
import
org.apache.skywalking.e2e.trace.TracesQuery
;
import
org.junit.jupiter.api.AfterAll
;
import
org.junit.jupiter.api.BeforeAll
;
import
org.testcontainers.containers.DockerComposeContainer
;
import
static
org
.
apache
.
skywalking
.
e2e
.
metrics
.
MetricsMatcher
.
verifyMetrics
;
import
static
org
.
apache
.
skywalking
.
e2e
.
metrics
.
MetricsQuery
.
ALL_ENDPOINT_METRICS
;
import
static
org
.
apache
.
skywalking
.
e2e
.
metrics
.
MetricsQuery
.
ALL_INSTANCE_METRICS
;
import
static
org
.
apache
.
skywalking
.
e2e
.
metrics
.
MetricsQuery
.
ALL_SERVICE_INSTANCE_RELATION_CLIENT_METRICS
;
import
static
org
.
apache
.
skywalking
.
e2e
.
metrics
.
MetricsQuery
.
ALL_SERVICE_INSTANCE_RELATION_SERVER_METRICS
;
import
static
org
.
apache
.
skywalking
.
e2e
.
metrics
.
MetricsQuery
.
ALL_SERVICE_METRICS
;
import
static
org
.
apache
.
skywalking
.
e2e
.
metrics
.
MetricsQuery
.
ALL_SERVICE_RELATION_CLIENT_METRICS
;
import
static
org
.
apache
.
skywalking
.
e2e
.
metrics
.
MetricsQuery
.
ALL_SERVICE_RELATION_SERVER_METRICS
;
import
static
org
.
apache
.
skywalking
.
e2e
.
utils
.
Yamls
.
load
;
import
static
org
.
apache
.
skywalking
.
e2e
.
utils
.
Times
.
now
;
@Slf4j
@SkyWalkingE2E
public
class
PHPE2E
extends
SkyWalkingTestAdapter
{
@SuppressWarnings
(
"unused"
)
@DockerCompose
(
"docker/php/docker-compose.yml"
)
private
DockerComposeContainer
<?>
justForSideEffects
;
@SuppressWarnings
(
"unused"
)
@ContainerHostAndPort
(
name
=
"ui"
,
port
=
8080
)
private
HostAndPort
swWebappHostPort
;
@SuppressWarnings
(
"unused"
)
@ContainerHostAndPort
(
name
=
"php"
,
port
=
8080
)
private
HostAndPort
phpHostPort
;
@SuppressWarnings
(
"unused"
)
@ContainerHostAndPort
(
name
=
"php-shadow"
,
port
=
8080
)
private
HostAndPort
phpShadowHostPort
;
private
final
String
shadowServiceName
=
"php-shadow"
;
@BeforeAll
public
void
setUp
()
throws
Exception
{
URL
url
=
new
URL
(
"http"
,
phpHostPort
.
host
(),
phpHostPort
.
port
(),
"/init"
);
restTemplate
.
getForObject
(
url
.
toURI
(),
String
.
class
);
Thread
.
sleep
(
1000
);
url
=
new
URL
(
"http"
,
phpShadowHostPort
.
host
(),
phpShadowHostPort
.
port
(),
"/init-shadow"
);
restTemplate
.
getForObject
(
url
.
toURI
(),
String
.
class
);
Thread
.
sleep
(
1000
);
queryClient
(
swWebappHostPort
);
trafficController
(
phpHostPort
,
"/php/info"
);
}
@AfterAll
public
void
tearDown
()
{
trafficController
.
stop
();
}
@RetryableTest
void
services
()
throws
Exception
{
final
List
<
Service
>
services
=
graphql
.
services
(
new
ServicesQuery
().
start
(
startTime
).
end
(
now
()));
LOGGER
.
info
(
"services: {}"
,
services
);
load
(
"expected/php/services.yml"
).
as
(
ServicesMatcher
.
class
).
verify
(
services
);
for
(
Service
service
:
services
)
{
LOGGER
.
info
(
"verifying service instances: {}"
,
service
);
verifyServiceMetrics
(
service
);
final
Instances
instances
=
verifyServiceInstances
(
service
);
verifyInstancesMetrics
(
instances
);
final
Endpoints
endpoints
=
verifyServiceEndpoints
(
service
);
verifyEndpointsMetrics
(
endpoints
);
}
}
@RetryableTest
void
traces
()
throws
Exception
{
final
List
<
Trace
>
traces
=
graphql
.
traces
(
new
TracesQuery
().
start
(
startTime
).
end
(
now
()).
orderByStartTime
());
LOGGER
.
info
(
"traces: {}"
,
traces
);
load
(
"expected/php/traces.yml"
).
as
(
TracesMatcher
.
class
).
verifyLoosely
(
traces
);
}
@RetryableTest
void
topology
()
throws
Exception
{
final
Topology
topology
=
graphql
.
topo
(
new
TopoQuery
().
stepByMinute
().
start
(
startTime
.
minusDays
(
1
)).
end
(
now
()));
LOGGER
.
info
(
"topology: {}"
,
topology
);
load
(
"expected/php/topo.yml"
).
as
(
TopoMatcher
.
class
).
verify
(
topology
);
verifyServiceRelationMetrics
(
topology
.
getCalls
());
}
@RetryableTest
void
serviceInstances
()
throws
Exception
{
final
ServiceInstanceTopology
topology
=
graphql
.
serviceInstanceTopo
(
new
ServiceInstanceTopologyQuery
().
stepByMinute
()
.
start
(
startTime
.
minusDays
(
1
))
.
end
(
now
())
.
clientServiceId
(
"1"
)
.
serverServiceId
(
"2"
));
LOGGER
.
info
(
"topology: {}"
,
topology
);
load
(
"expected/php/serviceInstanceTopo.yml"
).
as
(
ServiceInstanceTopologyMatcher
.
class
).
verify
(
topology
);
verifyServiceInstanceRelationMetrics
(
topology
.
getCalls
());
}
private
Instances
verifyServiceInstances
(
final
Service
service
)
throws
Exception
{
final
Instances
instances
=
graphql
.
instances
(
new
InstancesQuery
().
serviceId
(
service
.
getKey
()).
start
(
startTime
).
end
(
now
())
);
LOGGER
.
info
(
"instances: {} {}"
,
service
.
getLabel
(),
instances
);
if
(
shadowServiceName
.
equals
(
service
.
getLabel
()))
{
load
(
"expected/php/shadowInstances.yml"
).
as
(
InstancesMatcher
.
class
).
verify
(
instances
);
}
else
{
load
(
"expected/php/instances.yml"
).
as
(
InstancesMatcher
.
class
).
verify
(
instances
);
}
return
instances
;
}
private
Endpoints
verifyServiceEndpoints
(
final
Service
service
)
throws
Exception
{
final
Endpoints
endpoints
=
graphql
.
endpoints
(
new
EndpointQuery
().
serviceId
(
service
.
getKey
()));
LOGGER
.
info
(
"endpoints: {} {}"
,
service
.
getLabel
(),
endpoints
);
if
(
shadowServiceName
.
equals
(
service
.
getLabel
()))
{
load
(
"expected/php/shadowEndpoints.yml"
).
as
(
EndpointsMatcher
.
class
).
verify
(
endpoints
);
}
else
{
load
(
"expected/php/endpoints.yml"
).
as
(
EndpointsMatcher
.
class
).
verify
(
endpoints
);
}
return
endpoints
;
}
private
void
verifyInstancesMetrics
(
Instances
instances
)
throws
Exception
{
for
(
Instance
instance
:
instances
.
getInstances
())
{
for
(
String
metricsName
:
ALL_INSTANCE_METRICS
)
{
LOGGER
.
info
(
"verifying service instance response time: {}"
,
instance
);
final
Metrics
instanceMetrics
=
graphql
.
metrics
(
new
MetricsQuery
().
stepByMinute
().
metricsName
(
metricsName
).
id
(
instance
.
getKey
())
);
LOGGER
.
info
(
"instance metrics: {}"
,
instanceMetrics
);
final
AtLeastOneOfMetricsMatcher
instanceRespTimeMatcher
=
new
AtLeastOneOfMetricsMatcher
();
final
MetricsValueMatcher
greaterThanZero
=
new
MetricsValueMatcher
();
greaterThanZero
.
setValue
(
"gt 0"
);
instanceRespTimeMatcher
.
setValue
(
greaterThanZero
);
instanceRespTimeMatcher
.
verify
(
instanceMetrics
);
LOGGER
.
info
(
"{}: {}"
,
metricsName
,
instanceMetrics
);
}
}
}
private
void
verifyEndpointsMetrics
(
Endpoints
endpoints
)
throws
Exception
{
for
(
Endpoint
endpoint
:
endpoints
.
getEndpoints
())
{
if
(!
endpoint
.
getLabel
().
equals
(
"/php/call"
)
||
!
endpoint
.
getLabel
().
equals
(
"/php/info"
))
{
continue
;
}
for
(
final
String
metricName
:
ALL_ENDPOINT_METRICS
)
{
LOGGER
.
info
(
"verifying endpoint {}: {}"
,
endpoint
,
metricName
);
final
Metrics
metrics
=
graphql
.
metrics
(
new
MetricsQuery
().
stepByMinute
().
metricsName
(
metricName
).
id
(
endpoint
.
getKey
())
);
LOGGER
.
info
(
"metrics: {}"
,
metrics
);
final
AtLeastOneOfMetricsMatcher
instanceRespTimeMatcher
=
new
AtLeastOneOfMetricsMatcher
();
final
MetricsValueMatcher
greaterThanZero
=
new
MetricsValueMatcher
();
greaterThanZero
.
setValue
(
"gt 0"
);
instanceRespTimeMatcher
.
setValue
(
greaterThanZero
);
instanceRespTimeMatcher
.
verify
(
metrics
);
LOGGER
.
info
(
"{}: {}"
,
metricName
,
metrics
);
}
}
}
private
void
verifyServiceMetrics
(
final
Service
service
)
throws
Exception
{
for
(
String
metricName
:
ALL_SERVICE_METRICS
)
{
LOGGER
.
info
(
"verifying service {}, metrics: {}"
,
service
,
metricName
);
final
Metrics
serviceMetrics
=
graphql
.
metrics
(
new
MetricsQuery
().
stepByMinute
().
metricsName
(
metricName
).
id
(
service
.
getKey
())
);
LOGGER
.
info
(
"serviceMetrics: {}"
,
serviceMetrics
);
final
AtLeastOneOfMetricsMatcher
instanceRespTimeMatcher
=
new
AtLeastOneOfMetricsMatcher
();
final
MetricsValueMatcher
greaterThanZero
=
new
MetricsValueMatcher
();
greaterThanZero
.
setValue
(
"gt 0"
);
instanceRespTimeMatcher
.
setValue
(
greaterThanZero
);
instanceRespTimeMatcher
.
verify
(
serviceMetrics
);
LOGGER
.
info
(
"{}: {}"
,
metricName
,
serviceMetrics
);
}
}
private
void
verifyServiceInstanceRelationMetrics
(
final
List
<
Call
>
calls
)
throws
Exception
{
verifyRelationMetrics
(
calls
,
ALL_SERVICE_INSTANCE_RELATION_CLIENT_METRICS
,
ALL_SERVICE_INSTANCE_RELATION_SERVER_METRICS
);
}
private
void
verifyServiceRelationMetrics
(
final
List
<
Call
>
calls
)
throws
Exception
{
verifyRelationMetrics
(
calls
,
ALL_SERVICE_RELATION_CLIENT_METRICS
,
ALL_SERVICE_RELATION_SERVER_METRICS
);
}
private
void
verifyRelationMetrics
(
final
List
<
Call
>
calls
,
final
String
[]
relationClientMetrics
,
final
String
[]
relationServerMetrics
)
throws
Exception
{
for
(
Call
call
:
calls
)
{
for
(
String
detectPoint
:
call
.
getDetectPoints
())
{
switch
(
detectPoint
)
{
case
"CLIENT"
:
{
for
(
String
metricName
:
relationClientMetrics
)
{
verifyMetrics
(
graphql
,
metricName
,
call
.
getId
(),
startTime
);
}
break
;
}
case
"SERVER"
:
{
for
(
String
metricName
:
relationServerMetrics
)
{
verifyMetrics
(
graphql
,
metricName
,
call
.
getId
(),
startTime
);
}
break
;
}
}
}
}
}
}
test/e2e/e2e-test/src/test/resources/expected/php/endpoints.yml
0 → 100644
浏览文件 @
954eede0
# 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.
endpoints
:
-
key
:
not
null
label
:
/php/info
-
key
:
not
null
label
:
/php/call
test/e2e/e2e-test/src/test/resources/expected/php/instances.yml
0 → 100644
浏览文件 @
954eede0
# 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.
instances
:
-
key
:
2
label
:
not
null
attributes
:
-
name
:
os_name
value
:
not
null
-
name
:
host_name
value
:
not
null
-
name
:
process_no
value
:
gt
0
-
name
:
ipv4s
value
:
not
null
test/e2e/e2e-test/src/test/resources/expected/php/serviceInstanceTopo.yml
0 → 100644
浏览文件 @
954eede0
# 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
:
-
id
:
1
name
:
User
type
:
USER
serviceId
:
1
serviceName
:
User
isReal
:
false
-
id
:
2
name
:
not
null
serviceId
:
2
serviceName
:
php
type
:
not
null
isReal
:
true
calls
:
-
id
:
1_2
source
:
1
detectPoints
:
-
SERVER
target
:
2
test/e2e/e2e-test/src/test/resources/expected/php/services.yml
0 → 100644
浏览文件 @
954eede0
# 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.
services
:
-
key
:
gt
0
label
:
"
php"
-
key
:
gt
0
label
:
"
php-shadow"
\ No newline at end of file
test/e2e/e2e-test/src/test/resources/expected/php/shadowEndpoints.yml
0 → 100644
浏览文件 @
954eede0
# 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.
endpoints
:
-
key
:
not
null
label
:
/php/call
test/e2e/e2e-test/src/test/resources/expected/php/shadowInstances.yml
0 → 100644
浏览文件 @
954eede0
# 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.
instances
:
-
key
:
3
label
:
not
null
attributes
:
-
name
:
os_name
value
:
not
null
-
name
:
host_name
value
:
not
null
-
name
:
process_no
value
:
gt
0
-
name
:
ipv4s
value
:
not
null
test/e2e/e2e-test/src/test/resources/expected/php/topo.yml
0 → 100644
浏览文件 @
954eede0
# 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
:
-
id
:
1
name
:
User
type
:
USER
isReal
:
false
-
id
:
2
name
:
php
type
:
HttpClient
isReal
:
true
-
id
:
3
name
:
php-shadow
type
:
HttpClient
isReal
:
true
calls
:
-
id
:
1_2
source
:
1
detectPoints
:
-
SERVER
target
:
2
-
id
:
2_3
source
:
2
detectPoints
:
-
CLIENT
-
SERVER
target
:
3
\ No newline at end of file
test/e2e/e2e-test/src/test/resources/expected/php/traces.yml
0 → 100644
浏览文件 @
954eede0
# 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
:
-
key
:
not
null
endpointNames
:
-
/php/info
duration
:
ge
0
start
:
gt
0
isError
:
false
traceIds
:
-
not
null
-
key
:
not
null
endpointNames
:
-
/php/call
duration
:
ge
0
start
:
gt
0
isError
:
false
traceIds
:
-
not
null
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录