Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
月轩居士
SkyWalking
提交
c778a0d6
S
SkyWalking
项目概览
月轩居士
/
SkyWalking
与 Fork 源项目一致
Fork自
apache / SkyWalking
通知
4
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,发现更多精彩内容 >>
未验证
提交
c778a0d6
编写于
6月 20, 2020
作者:
于
于玉桔
提交者:
GitHub
6月 20, 2020
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Support Quasar fiber tracing (#4951)
上级
b1b14448
变更
20
隐藏空白更改
内联
并排
Showing
20 changed file
with
700 addition
and
0 deletion
+700
-0
.github/workflows/plugins-test.3.yaml
.github/workflows/plugins-test.3.yaml
+1
-0
apm-protocol/apm-network/src/main/java/org/apache/skywalking/apm/network/trace/component/ComponentsDefine.java
...walking/apm/network/trace/component/ComponentsDefine.java
+2
-0
apm-sniffer/apm-sdk-plugin/pom.xml
apm-sniffer/apm-sdk-plugin/pom.xml
+1
-0
apm-sniffer/apm-sdk-plugin/quasar-plugin/pom.xml
apm-sniffer/apm-sdk-plugin/quasar-plugin/pom.xml
+45
-0
apm-sniffer/apm-sdk-plugin/quasar-plugin/src/main/java/org/apache/skywalking/apm/plugin/quasar/FiberInterceptor.java
...apache/skywalking/apm/plugin/quasar/FiberInterceptor.java
+68
-0
apm-sniffer/apm-sdk-plugin/quasar-plugin/src/main/java/org/apache/skywalking/apm/plugin/quasar/define/FiberInstrumentation.java
...alking/apm/plugin/quasar/define/FiberInstrumentation.java
+82
-0
apm-sniffer/apm-sdk-plugin/quasar-plugin/src/main/resources/skywalking-plugin.def
...in/quasar-plugin/src/main/resources/skywalking-plugin.def
+17
-0
docs/en/setup/service-agent/java-agent/Supported-list.md
docs/en/setup/service-agent/java-agent/Supported-list.md
+1
-0
oap-server/server-bootstrap/src/main/resources/component-libraries.yml
...rver-bootstrap/src/main/resources/component-libraries.yml
+3
-0
oap-server/server-core/src/test/resources/component-libraries.yml
...er/server-core/src/test/resources/component-libraries.yml
+3
-0
test/plugin/scenarios/quasar-scenario/bin/startup.sh
test/plugin/scenarios/quasar-scenario/bin/startup.sh
+21
-0
test/plugin/scenarios/quasar-scenario/config/expectedData.yaml
...plugin/scenarios/quasar-scenario/config/expectedData.yaml
+70
-0
test/plugin/scenarios/quasar-scenario/configuration.yml
test/plugin/scenarios/quasar-scenario/configuration.yml
+20
-0
test/plugin/scenarios/quasar-scenario/pom.xml
test/plugin/scenarios/quasar-scenario/pom.xml
+128
-0
test/plugin/scenarios/quasar-scenario/src/main/assembly/assembly.xml
.../scenarios/quasar-scenario/src/main/assembly/assembly.xml
+41
-0
test/plugin/scenarios/quasar-scenario/src/main/java/org/apache/skywalking/apm/testcase/quasar/Application.java
...rg/apache/skywalking/apm/testcase/quasar/Application.java
+39
-0
test/plugin/scenarios/quasar-scenario/src/main/java/org/apache/skywalking/apm/testcase/quasar/controller/CaseController.java
...alking/apm/testcase/quasar/controller/CaseController.java
+82
-0
test/plugin/scenarios/quasar-scenario/src/main/resources/application.yaml
...arios/quasar-scenario/src/main/resources/application.yaml
+23
-0
test/plugin/scenarios/quasar-scenario/src/main/resources/log4j2.xml
...n/scenarios/quasar-scenario/src/main/resources/log4j2.xml
+30
-0
test/plugin/scenarios/quasar-scenario/support-version.list
test/plugin/scenarios/quasar-scenario/support-version.list
+23
-0
未找到文件。
.github/workflows/plugins-test.3.yaml
浏览文件 @
c778a0d6
...
...
@@ -45,6 +45,7 @@ jobs:
-
{
name
:
'
vertx-web-3.54minus-scenario'
,
title
:
'
Vert.x
Web
3.0.0-3.5.4
(16)'
}
-
{
name
:
'
vertx-web-3.6plus-scenario'
,
title
:
'
Vert.x
Web
3.6.0-3.9.1
(14)'
}
-
{
name
:
'
mariadb-scenario'
,
title
:
'
Mariadb
2.x
(8)'
}
-
{
name
:
'
quasar-scenario'
,
title
:
'
quasar
0.7.x
(5)'
}
steps
:
-
uses
:
actions/checkout@v2
with
:
...
...
apm-protocol/apm-network/src/main/java/org/apache/skywalking/apm/network/trace/component/ComponentsDefine.java
浏览文件 @
c778a0d6
...
...
@@ -158,4 +158,6 @@ public class ComponentsDefine {
public
static
final
OfficialComponent
FINAGLE
=
new
OfficialComponent
(
85
,
"Finagle"
);
public
static
final
OfficialComponent
MARIADB_JDBC
=
new
OfficialComponent
(
87
,
"mariadb-jdbc"
);
public
static
final
OfficialComponent
QUASAR
=
new
OfficialComponent
(
88
,
"quasar"
);
}
apm-sniffer/apm-sdk-plugin/pom.xml
浏览文件 @
c778a0d6
...
...
@@ -90,6 +90,7 @@
<module>
lettuce-5.x-plugin
</module>
<module>
avro-plugin
</module>
<module>
finagle-6.25.x-plugin
</module>
<module>
quasar-plugin
</module>
<module>
mariadb-2.x-plugin
</module>
</modules>
<packaging>
pom
</packaging>
...
...
apm-sniffer/apm-sdk-plugin/quasar-plugin/pom.xml
0 → 100644
浏览文件 @
c778a0d6
<?xml version="1.0"?>
<!--
~ 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"
>
<modelVersion>
4.0.0
</modelVersion>
<parent>
<groupId>
org.apache.skywalking
</groupId>
<artifactId>
apm-sdk-plugin
</artifactId>
<version>
8.1.0-SNAPSHOT
</version>
</parent>
<artifactId>
apm-quasar-plugin
</artifactId>
<packaging>
jar
</packaging>
<name>
quasar-plugin
</name>
<url>
http://maven.apache.org
</url>
<properties>
<quasar-core.version>
0.7.10
</quasar-core.version>
</properties>
<dependencies>
<dependency>
<groupId>
co.paralleluniverse
</groupId>
<artifactId>
quasar-core
</artifactId>
<version>
${quasar-core.version}
</version>
<scope>
provided
</scope>
</dependency>
</dependencies>
</project>
\ No newline at end of file
apm-sniffer/apm-sdk-plugin/quasar-plugin/src/main/java/org/apache/skywalking/apm/plugin/quasar/FiberInterceptor.java
0 → 100644
浏览文件 @
c778a0d6
/*
* 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.plugin.quasar
;
import
org.apache.skywalking.apm.agent.core.context.ContextManager
;
import
org.apache.skywalking.apm.agent.core.context.ContextSnapshot
;
import
org.apache.skywalking.apm.agent.core.context.trace.AbstractSpan
;
import
org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.EnhancedInstance
;
import
org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.InstanceConstructorInterceptor
;
import
org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.InstanceMethodsAroundInterceptor
;
import
org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.MethodInterceptResult
;
import
org.apache.skywalking.apm.network.trace.component.ComponentsDefine
;
import
java.lang.reflect.Method
;
public
class
FiberInterceptor
implements
InstanceMethodsAroundInterceptor
,
InstanceConstructorInterceptor
{
private
static
final
String
OPERATION_NAME
=
"QUASAR/Fiber"
;
@Override
public
void
beforeMethod
(
EnhancedInstance
objInst
,
Method
method
,
Object
[]
allArguments
,
Class
<?>[]
argumentsTypes
,
MethodInterceptResult
result
)
throws
Throwable
{
AbstractSpan
span
=
ContextManager
.
createLocalSpan
(
OPERATION_NAME
);
span
.
setComponent
(
ComponentsDefine
.
QUASAR
);
if
(
objInst
.
getSkyWalkingDynamicField
()
!=
null
)
{
ContextManager
.
continued
((
ContextSnapshot
)
objInst
.
getSkyWalkingDynamicField
());
objInst
.
setSkyWalkingDynamicField
(
null
);
}
}
@Override
public
Object
afterMethod
(
EnhancedInstance
objInst
,
Method
method
,
Object
[]
allArguments
,
Class
<?>[]
argumentsTypes
,
Object
ret
)
throws
Throwable
{
ContextManager
.
stopSpan
();
return
ret
;
}
@Override
public
void
handleMethodException
(
EnhancedInstance
objInst
,
Method
method
,
Object
[]
allArguments
,
Class
<?>[]
argumentsTypes
,
Throwable
t
)
{
AbstractSpan
span
=
ContextManager
.
activeSpan
();
span
.
errorOccurred
();
span
.
log
(
t
);
}
@Override
public
void
onConstruct
(
EnhancedInstance
objInst
,
Object
[]
allArguments
)
{
if
(
ContextManager
.
isActive
())
{
objInst
.
setSkyWalkingDynamicField
(
ContextManager
.
capture
());
}
}
}
apm-sniffer/apm-sdk-plugin/quasar-plugin/src/main/java/org/apache/skywalking/apm/plugin/quasar/define/FiberInstrumentation.java
0 → 100644
浏览文件 @
c778a0d6
/*
* 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.plugin.quasar.define
;
import
net.bytebuddy.description.method.MethodDescription
;
import
net.bytebuddy.matcher.ElementMatcher
;
import
org.apache.skywalking.apm.agent.core.plugin.interceptor.ConstructorInterceptPoint
;
import
org.apache.skywalking.apm.agent.core.plugin.interceptor.InstanceMethodsInterceptPoint
;
import
org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.ClassInstanceMethodsEnhancePluginDefine
;
import
org.apache.skywalking.apm.agent.core.plugin.match.ClassMatch
;
import
static
net
.
bytebuddy
.
matcher
.
ElementMatchers
.
isProtected
;
import
static
net
.
bytebuddy
.
matcher
.
ElementMatchers
.
named
;
import
static
org
.
apache
.
skywalking
.
apm
.
agent
.
core
.
plugin
.
bytebuddy
.
ArgumentTypeNameMatch
.
takesArgumentWithType
;
import
static
org
.
apache
.
skywalking
.
apm
.
agent
.
core
.
plugin
.
match
.
NameMatch
.
byName
;
public
class
FiberInstrumentation
extends
ClassInstanceMethodsEnhancePluginDefine
{
private
static
final
String
ENHANCE_CLASS
=
"co.paralleluniverse.fibers.Fiber"
;
private
static
final
String
INTERCEPTOR_CLASS
=
"org.apache.skywalking.apm.plugin.quasar.FiberInterceptor"
;
@Override
public
ConstructorInterceptPoint
[]
getConstructorsInterceptPoints
()
{
return
new
ConstructorInterceptPoint
[]
{
new
ConstructorInterceptPoint
()
{
@Override
public
ElementMatcher
<
MethodDescription
>
getConstructorMatcher
()
{
return
takesArgumentWithType
(
3
,
"co.paralleluniverse.strands.SuspendableCallable"
);
}
@Override
public
String
getConstructorInterceptor
()
{
return
INTERCEPTOR_CLASS
;
}
}
};
}
@Override
public
InstanceMethodsInterceptPoint
[]
getInstanceMethodsInterceptPoints
()
{
return
new
InstanceMethodsInterceptPoint
[]
{
new
InstanceMethodsInterceptPoint
()
{
@Override
public
ElementMatcher
<
MethodDescription
>
getMethodsMatcher
()
{
return
isProtected
().
and
(
named
(
"run"
));
}
@Override
public
String
getMethodsInterceptor
()
{
return
INTERCEPTOR_CLASS
;
}
@Override
public
boolean
isOverrideArgs
()
{
return
false
;
}
}
};
}
@Override
public
ClassMatch
enhanceClass
()
{
return
byName
(
ENHANCE_CLASS
);
}
}
apm-sniffer/apm-sdk-plugin/quasar-plugin/src/main/resources/skywalking-plugin.def
0 → 100644
浏览文件 @
c778a0d6
# 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.
quasar=org.apache.skywalking.apm.plugin.quasar.define.FiberInstrumentation
\ No newline at end of file
docs/en/setup/service-agent/java-agent/Supported-list.md
浏览文件 @
c778a0d6
...
...
@@ -88,6 +88,7 @@
*
Vert.x Web 3.x
*
Thread Schedule Framework
*
[
Spring @Async
](
https://github.com/spring-projects/spring-framework
)
4.x and 5.x
*
[
Quasar
](
https://github.com/puniverse/quasar
)
0.7.x
*
Cache
*
[
Ehcache
](
https://www.ehcache.org/
)
2.x
*
Kotlin
...
...
oap-server/server-bootstrap/src/main/resources/component-libraries.yml
浏览文件 @
c778a0d6
...
...
@@ -293,6 +293,9 @@ Mariadb:
mariadb-jdbc
:
id
:
87
languages
:
Java
quasar
:
id
:
88
languages
:
Java
# .NET/.NET Core components
# [3000, 4000) for C#/.NET only
...
...
oap-server/server-core/src/test/resources/component-libraries.yml
浏览文件 @
c778a0d6
...
...
@@ -257,6 +257,9 @@ Mariadb:
mariadb-jdbc
:
id
:
87
languages
:
Java
quasar
:
id
:
88
languages
:
Java
# .NET/.NET Core components
...
...
test/plugin/scenarios/quasar-scenario/bin/startup.sh
0 → 100644
浏览文件 @
c778a0d6
#!/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
}
-Dco
.paralleluniverse.fibers.detectRunawayFibers
=
false
${
home
}
/../libs/quasar-scenario.jar &
\ No newline at end of file
test/plugin/scenarios/quasar-scenario/config/expectedData.yaml
0 → 100644
浏览文件 @
c778a0d6
# 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.
segmentItems
:
-
serviceName
:
quasar-scenario
segmentSize
:
ge
3
segments
:
-
segmentId
:
not
null
spans
:
-
operationName
:
/quasar-scenario/case/quasar-scenario
operationId
:
0
parentSpanId
:
-1
spanId
:
0
spanLayer
:
Http
startTime
:
nq
0
endTime
:
nq
0
componentId
:
1
isError
:
false
spanType
:
Entry
peer
:
'
'
skipAnalysis
:
false
tags
:
-
{
key
:
url
,
value
:
'
http://localhost:8080/quasar-scenario/case/quasar-scenario'
}
-
{
key
:
http.method
,
value
:
GET
}
-
segmentId
:
not
null
spans
:
-
operationName
:
/quasar-scenario/case/ping
operationId
:
0
parentSpanId
:
0
spanId
:
1
spanLayer
:
Http
startTime
:
nq
0
endTime
:
nq
0
componentId
:
12
isError
:
false
spanType
:
Exit
peer
:
localhost:8080
skipAnalysis
:
false
tags
:
-
{
key
:
http.method
,
value
:
GET
}
-
{
key
:
url
,
value
:
'
http://localhost:8080/quasar-scenario/case/ping'
}
-
operationName
:
QUASAR/Fiber
operationId
:
0
parentSpanId
:
-1
spanId
:
0
spanLayer
:
Unknown
startTime
:
nq
0
endTime
:
nq
0
componentId
:
88
isError
:
false
spanType
:
Local
peer
:
'
'
skipAnalysis
:
false
refs
:
-
{
parentEndpoint
:
/quasar-scenario/case/quasar-scenario
,
networkAddress
:
'
'
,
refType
:
CrossThread
,
parentSpanId
:
0
,
parentTraceSegmentId
:
not null
,
parentServiceInstance
:
not null
,
parentService
:
quasar-scenario
,
traceId
:
not null
}
\ No newline at end of file
test/plugin/scenarios/quasar-scenario/configuration.yml
0 → 100644
浏览文件 @
c778a0d6
# 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/quasar-scenario/case/quasar-scenario
healthCheck
:
http://localhost:8080/quasar-scenario/case/healthCheck
startScript
:
./bin/startup.sh
test/plugin/scenarios/quasar-scenario/pom.xml
0 → 100644
浏览文件 @
c778a0d6
<?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>
quasar-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>
0.7.9
</test.framework.version>
<docker.image.version>
${test.framework.version}
</docker.image.version>
<spring-boot-version>
2.1.6.RELEASE
</spring-boot-version>
<okhttp.version>
3.6.0
</okhttp.version>
</properties>
<name>
skywalking-quasar-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>
<dependency>
<groupId>
co.paralleluniverse
</groupId>
<artifactId>
quasar-core
</artifactId>
<version>
${test.framework.version}
</version>
</dependency>
<dependency>
<groupId>
com.squareup.okhttp3
</groupId>
<artifactId>
okhttp
</artifactId>
<version>
${okhttp.version}
</version>
</dependency>
</dependencies>
<build>
<finalName>
quasar-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/quasar-scenario/src/main/assembly/assembly.xml
0 → 100644
浏览文件 @
c778a0d6
<?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}/quasar-scenario.jar
</source>
<outputDirectory>
./libs
</outputDirectory>
<fileMode>
0775
</fileMode>
</file>
</files>
</assembly>
test/plugin/scenarios/quasar-scenario/src/main/java/org/apache/skywalking/apm/testcase/quasar/Application.java
0 → 100644
浏览文件 @
c778a0d6
/*
* 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.quasar
;
import
org.apache.logging.log4j.LogManager
;
import
org.apache.logging.log4j.Logger
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
@SpringBootApplication
public
class
Application
{
private
static
final
Logger
logger
=
LogManager
.
getLogger
(
Application
.
class
);
public
static
void
main
(
String
[]
args
)
{
try
{
SpringApplication
.
run
(
Application
.
class
,
args
);
}
catch
(
Exception
ex
)
{
logger
.
error
(
"Application start error"
,
ex
);
throw
ex
;
}
}
}
test/plugin/scenarios/quasar-scenario/src/main/java/org/apache/skywalking/apm/testcase/quasar/controller/CaseController.java
0 → 100644
浏览文件 @
c778a0d6
/*
* 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.quasar.controller
;
import
co.paralleluniverse.fibers.Fiber
;
import
co.paralleluniverse.strands.SuspendableCallable
;
import
okhttp3.Call
;
import
okhttp3.OkHttpClient
;
import
okhttp3.Request
;
import
okhttp3.Response
;
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
;
@RestController
@RequestMapping
(
"/case"
)
public
class
CaseController
{
private
static
final
Logger
logger
=
LogManager
.
getLogger
(
CaseController
.
class
);
private
static
final
String
SUCCESS
=
"Success"
;
@RequestMapping
(
"/quasar-scenario"
)
@ResponseBody
public
String
testcase
()
throws
Exception
{
Fiber
fiber
=
new
Fiber
(
"fiber"
,
new
SuspendableCallable
()
{
@Override
public
Object
run
()
{
try
{
call
(
"http://localhost:8080/quasar-scenario/case/ping"
);
}
catch
(
Exception
e
)
{
logger
.
error
(
"quasar error:"
,
e
);
}
return
null
;
}
}
);
fiber
.
start
();
return
SUCCESS
;
}
private
String
call
(
String
url
)
throws
IOException
{
OkHttpClient
okHttpClient
=
new
OkHttpClient
();
final
Request
request
=
new
Request
.
Builder
().
url
(
url
).
build
();
Call
call
=
okHttpClient
.
newCall
(
request
);
Response
response
=
call
.
execute
();
return
response
.
body
().
string
();
}
@RequestMapping
(
"/healthCheck"
)
@ResponseBody
public
String
healthCheck
()
throws
Exception
{
return
SUCCESS
;
}
@RequestMapping
(
"/ping"
)
@ResponseBody
public
String
ping
()
throws
Exception
{
return
SUCCESS
;
}
}
test/plugin/scenarios/quasar-scenario/src/main/resources/application.yaml
0 → 100644
浏览文件 @
c778a0d6
#
# 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
:
/quasar-scenario
logging
:
config
:
classpath:log4j2.xml
test/plugin/scenarios/quasar-scenario/src/main/resources/log4j2.xml
0 → 100644
浏览文件 @
c778a0d6
<?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=
"INFO"
>
<AppenderRef
ref=
"Console"
/>
</Root>
</Loggers>
</Configuration>
test/plugin/scenarios/quasar-scenario/support-version.list
0 → 100644
浏览文件 @
c778a0d6
# 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
0.7.10
0.7.9
0.7.8
0.7.4
0.7.0
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录