Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
czzxueyang
skywalking
提交
e139e163
S
skywalking
项目概览
czzxueyang
/
skywalking
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
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,发现更多精彩内容 >>
提交
e139e163
编写于
12月 10, 2019
作者:
Z
zhang-wei
提交者:
wu-sheng
12月 10, 2019
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[test/plugin] immigrate jdk http scenario (#4035)
* jdk-http * jdk-http-scenario * action
上级
8636bfd8
变更
11
隐藏空白更改
内联
并排
Showing
11 changed file
with
455 addition
and
1 deletion
+455
-1
.github/workflows/plugins-test.yaml
.github/workflows/plugins-test.yaml
+3
-1
test/plugin/scenarios/jdk-http-scenario/bin/startup.sh
test/plugin/scenarios/jdk-http-scenario/bin/startup.sh
+21
-0
test/plugin/scenarios/jdk-http-scenario/config/expectedData.yaml
...ugin/scenarios/jdk-http-scenario/config/expectedData.yaml
+85
-0
test/plugin/scenarios/jdk-http-scenario/configuration.yml
test/plugin/scenarios/jdk-http-scenario/configuration.yml
+23
-0
test/plugin/scenarios/jdk-http-scenario/pom.xml
test/plugin/scenarios/jdk-http-scenario/pom.xml
+113
-0
test/plugin/scenarios/jdk-http-scenario/src/main/assembly/assembly.xml
...cenarios/jdk-http-scenario/src/main/assembly/assembly.xml
+41
-0
test/plugin/scenarios/jdk-http-scenario/src/main/java/org/apache/skywalking/apm/testcase/jdkhttp/Application.java
...g/apache/skywalking/apm/testcase/jdkhttp/Application.java
+35
-0
test/plugin/scenarios/jdk-http-scenario/src/main/java/org/apache/skywalking/apm/testcase/jdkhttp/controller/CaseController.java
...lking/apm/testcase/jdkhttp/controller/CaseController.java
+62
-0
test/plugin/scenarios/jdk-http-scenario/src/main/resources/application.yaml
...ios/jdk-http-scenario/src/main/resources/application.yaml
+23
-0
test/plugin/scenarios/jdk-http-scenario/src/main/resources/log4j2.xml
...scenarios/jdk-http-scenario/src/main/resources/log4j2.xml
+30
-0
test/plugin/scenarios/jdk-http-scenario/support-version.list
test/plugin/scenarios/jdk-http-scenario/support-version.list
+19
-0
未找到文件。
.github/workflows/plugins-test.yaml
浏览文件 @
e139e163
...
...
@@ -445,7 +445,7 @@ jobs:
-
name
:
Run elasticsearch-6.x-scenario 6.7.1-6.8.4 (7)
run
:
bash test/plugin/run.sh elasticsearch-6.x-scenario
Oracle_Kafka
:
Oracle_Kafka
_JdkHttp
:
runs-on
:
ubuntu-18.04
timeout-minutes
:
90
strategy
:
...
...
@@ -474,6 +474,8 @@ jobs:
bash test/plugin/run.sh oracle-scenario
-
name
:
Run kafka 0.11.0.0-2.3.0 (16)
run
:
bash test/plugin/run.sh kafka-scenario
-
name
:
Run jdk http (1)
run
:
bash test/plugin/run.sh jdk-http-scenario
MySQL
:
runs-on
:
ubuntu-18.04
...
...
test/plugin/scenarios/jdk-http-scenario/bin/startup.sh
0 → 100644
浏览文件 @
e139e163
#!/bin/bash
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
home
=
"
$(
cd
"
$(
dirname
$0
)
"
;
pwd
)
"
java
-jar
${
agent_opts
}
${
home
}
/../libs/jdk-http-scenario.jar &
\ No newline at end of file
test/plugin/scenarios/jdk-http-scenario/config/expectedData.yaml
0 → 100644
浏览文件 @
e139e163
# 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.
registryItems
:
applications
:
-
{
jdk-http-scenario
:
2
}
instances
:
-
{
jdk-http-scenario
:
1
}
operationNames
:
-
jdk-http-scenario
:
[
/jdk-http-scenario/case/receiveContext-0
,
/jdk-http-scenario/case/jdk-http-scenario
]
heartbeat
:
[]
segmentItems
:
-
applicationCode
:
jdk-http-scenario
segmentSize
:
gt
2
segments
:
-
segmentId
:
not
null
spans
:
-
operationName
:
/jdk-http-scenario/case/receiveContext-0
operationId
:
0
parentSpanId
:
-1
spanId
:
0
spanLayer
:
Http
startTime
:
nq
0
endTime
:
nq
0
componentId
:
1
componentName
:
'
'
isError
:
false
spanType
:
Entry
peer
:
'
'
peerId
:
0
tags
:
-
{
key
:
url
,
value
:
'
http://localhost:8080/jdk-http-scenario/case/receiveContext-0'
}
-
{
key
:
http.method
,
value
:
GET
}
refs
:
-
{
parentEndpointId
:
0
,
parentEndpoint
:
/jdk-http-scenario/case/jdk-http-scenario
,
networkAddressId
:
0
,
entryEndpointId
:
0
,
refType
:
CrossProcess
,
parentSpanId
:
1
,
parentTraceSegmentId
:
not null
,
parentServiceInstanceId
:
1
,
networkAddress
:
'
localhost:8080'
,
entryEndpoint
:
/jdk-http-scenario/case/jdk-http-scenario
,
entryServiceInstanceId
:
1
}
-
segmentId
:
not
null
spans
:
-
operationName
:
/jdk-http-scenario/case/receiveContext-0
operationId
:
0
parentSpanId
:
0
spanId
:
1
spanLayer
:
Http
startTime
:
nq
0
endTime
:
nq
0
componentId
:
66
componentName
:
'
'
isError
:
false
spanType
:
Exit
peer
:
localhost:8080
peerId
:
0
tags
:
-
{
key
:
http.method
,
value
:
GET
}
-
{
key
:
url
,
value
:
'
http://localhost:8080/jdk-http-scenario/case/receiveContext-0'
}
-
operationName
:
/jdk-http-scenario/case/jdk-http-scenario
operationId
:
0
parentSpanId
:
-1
spanId
:
0
spanLayer
:
Http
startTime
:
nq
0
endTime
:
nq
0
componentId
:
1
componentName
:
'
'
isError
:
false
spanType
:
Entry
peer
:
'
'
peerId
:
0
tags
:
-
{
key
:
url
,
value
:
'
http://localhost:8080/jdk-http-scenario/case/jdk-http-scenario'
}
-
{
key
:
http.method
,
value
:
GET
}
test/plugin/scenarios/jdk-http-scenario/configuration.yml
0 → 100644
浏览文件 @
e139e163
# 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.
type
:
jvm
entryService
:
http://localhost:8080/jdk-http-scenario/case/jdk-http-scenario
healthCheck
:
http://localhost:8080/jdk-http-scenario/case/healthCheck
startScript
:
./bin/startup.sh
framework
:
jdk-http-scenario
runningMode
:
with_bootstrap
withPlugins
:
apm-jdk-http-plugin-*.jar
test/plugin/scenarios/jdk-http-scenario/pom.xml
0 → 100644
浏览文件 @
e139e163
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Licensed to the Apache Software Foundation (ASF) under one or more
~ contributor license agreements. See the NOTICE file distributed with
~ this work for additional information regarding copyright ownership.
~ The ASF licenses this file to You under the Apache License, Version 2.0
~ (the "License"); you may not use this file except in compliance with
~ the License. You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
~
-->
<project
xmlns=
"http://maven.apache.org/POM/4.0.0"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
>
<groupId>
org.apache.skywalking.apm.testcase
</groupId>
<artifactId>
jdk-http-scenario
</artifactId>
<version>
1.0.0
</version>
<packaging>
jar
</packaging>
<modelVersion>
4.0.0
</modelVersion>
<properties>
<project.build.sourceEncoding>
UTF-8
</project.build.sourceEncoding>
<compiler.version>
1.8
</compiler.version>
<test.framework.version>
YOUR VERSION
</test.framework.version>
<spring-boot-version>
2.1.6.RELEASE
</spring-boot-version>
</properties>
<name>
skywalking-jdk-http-scenario
</name>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-dependencies
</artifactId>
<version>
${spring-boot-version}
</version>
<type>
pom
</type>
<scope>
import
</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-web
</artifactId>
<exclusions>
<exclusion>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-logging
</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-log4j2
</artifactId>
</dependency>
</dependencies>
<build>
<finalName>
jdk-http-scenario
</finalName>
<plugins>
<plugin>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-maven-plugin
</artifactId>
<executions>
<execution>
<goals>
<goal>
repackage
</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>
maven-compiler-plugin
</artifactId>
<configuration>
<source>
${compiler.version}
</source>
<target>
${compiler.version}
</target>
<encoding>
${project.build.sourceEncoding}
</encoding>
</configuration>
</plugin>
<plugin>
<groupId>
org.apache.maven.plugins
</groupId>
<artifactId>
maven-assembly-plugin
</artifactId>
<executions>
<execution>
<id>
assemble
</id>
<phase>
package
</phase>
<goals>
<goal>
single
</goal>
</goals>
<configuration>
<descriptors>
<descriptor>
src/main/assembly/assembly.xml
</descriptor>
</descriptors>
<outputDirectory>
./target/
</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
\ No newline at end of file
test/plugin/scenarios/jdk-http-scenario/src/main/assembly/assembly.xml
0 → 100644
浏览文件 @
e139e163
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Licensed to the Apache Software Foundation (ASF) under one or more
~ contributor license agreements. See the NOTICE file distributed with
~ this work for additional information regarding copyright ownership.
~ The ASF licenses this file to You under the Apache License, Version 2.0
~ (the "License"); you may not use this file except in compliance with
~ the License. You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
~
-->
<assembly
xmlns=
"http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd"
>
<formats>
<format>
zip
</format>
</formats>
<fileSets>
<fileSet>
<directory>
./bin
</directory>
<fileMode>
0775
</fileMode>
</fileSet>
</fileSets>
<files>
<file>
<source>
${project.build.directory}/jdk-http-scenario.jar
</source>
<outputDirectory>
./libs
</outputDirectory>
<fileMode>
0775
</fileMode>
</file>
</files>
</assembly>
test/plugin/scenarios/jdk-http-scenario/src/main/java/org/apache/skywalking/apm/testcase/jdkhttp/Application.java
0 → 100644
浏览文件 @
e139e163
/*
* 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.apm.testcase.jdkhttp
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
@SpringBootApplication
public
class
Application
{
public
static
void
main
(
String
[]
args
)
{
try
{
SpringApplication
.
run
(
Application
.
class
,
args
);
}
catch
(
Exception
e
)
{
// Never do this
}
}
}
test/plugin/scenarios/jdk-http-scenario/src/main/java/org/apache/skywalking/apm/testcase/jdkhttp/controller/CaseController.java
0 → 100644
浏览文件 @
e139e163
/*
* 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.apm.testcase.jdkhttp.controller
;
import
org.apache.logging.log4j.LogManager
;
import
org.apache.logging.log4j.Logger
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.io.IOException
;
import
java.net.HttpURLConnection
;
import
java.net.URL
;
@RestController
@RequestMapping
(
"/case"
)
public
class
CaseController
{
private
static
final
Logger
logger
=
LogManager
.
getLogger
(
CaseController
.
class
);
private
static
final
String
SUCCESS
=
"Success"
;
@RequestMapping
(
"/jdk-http-scenario"
)
@ResponseBody
public
String
testcase
()
throws
IOException
{
URL
url
=
new
URL
(
"http://localhost:8080/jdk-http-scenario/case/receiveContext-0"
);
HttpURLConnection
connection
=
(
HttpURLConnection
)
url
.
openConnection
();
connection
.
addRequestProperty
(
"key"
,
"value"
);
int
responseCode
=
connection
.
getResponseCode
();
return
"Success:"
+
responseCode
;
}
@RequestMapping
(
"/healthCheck"
)
@ResponseBody
public
String
healthCheck
()
{
// your codes
return
SUCCESS
;
}
@RequestMapping
(
"/receiveContext-0"
)
@ResponseBody
public
String
receiveContextService0
()
{
return
"receiveContext-0"
;
}
}
test/plugin/scenarios/jdk-http-scenario/src/main/resources/application.yaml
0 → 100644
浏览文件 @
e139e163
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
#
server
:
port
:
8080
servlet
:
context-path
:
/jdk-http-scenario
logging
:
config
:
classpath:log4j2.xml
\ No newline at end of file
test/plugin/scenarios/jdk-http-scenario/src/main/resources/log4j2.xml
0 → 100644
浏览文件 @
e139e163
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Licensed to the Apache Software Foundation (ASF) under one or more
~ contributor license agreements. See the NOTICE file distributed with
~ this work for additional information regarding copyright ownership.
~ The ASF licenses this file to You under the Apache License, Version 2.0
~ (the "License"); you may not use this file except in compliance with
~ the License. You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
~
-->
<Configuration
status=
"WARN"
>
<Appenders>
<Console
name=
"Console"
target=
"SYSTEM_ERR"
>
<PatternLayout
charset=
"UTF-8"
pattern=
"[%d{yyyy-MM-dd HH:mm:ss:SSS}] [%p] - %l - %m%n"
/>
</Console>
</Appenders>
<Loggers>
<Root
level=
"WARN"
>
<AppenderRef
ref=
"Console"
/>
</Root>
</Loggers>
</Configuration>
\ No newline at end of file
test/plugin/scenarios/jdk-http-scenario/support-version.list
0 → 100644
浏览文件 @
e139e163
# 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
# "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.
# lists your version here
all
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录