Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
apache
SkyWalking
提交
daceca28
S
SkyWalking
项目概览
apache
/
SkyWalking
上一次同步 1 年多
通知
302
Star
21345
Fork
6091
代码
文件
提交
分支
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 搜索 >>
提交
daceca28
编写于
4月 13, 2018
作者:
C
carlvine500
提交者:
wu-sheng
4月 13, 2018
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add doc for TraceCrossThread (#1067)
* add doc for TraceCrossThread
上级
8612f802
变更
4
显示空白变更内容
内联
并排
Showing
4 changed file
with
77 addition
and
1 deletion
+77
-1
docs/README.md
docs/README.md
+1
-0
docs/README_ZH.md
docs/README_ZH.md
+2
-1
docs/cn/Application-toolkit-trace-cross-thread-CN.md
docs/cn/Application-toolkit-trace-cross-thread-CN.md
+38
-0
docs/en/Application-toolkit-trace-cross-thread.md
docs/en/Application-toolkit-trace-cross-thread.md
+36
-0
未找到文件。
docs/README.md
浏览文件 @
daceca28
...
...
@@ -21,6 +21,7 @@
*
[
log4j2
](
en/Application-toolkit-log4j-2.x.md
)
*
[
logback
](
en/Application-toolkit-logback-1.x.md
)
*
[
Trace
](
en/Application-toolkit-trace.md
)
*
[
Propagate Context across Thread
](
en/Application-toolkit-trace-cross-thread.md
)
*
Testing
*
[
Plugin Test
](
https://github.com/SkywalkingTest/agent-integration-test-report
)
*
[
Java Agent Performance Test
](
https://skywalkingtest.github.io/Agent-Benchmarks/
)
...
...
docs/README_ZH.md
浏览文件 @
daceca28
...
...
@@ -21,6 +21,7 @@
*
[
log4j2组件
](
cn/Application-toolkit-log4j-2.x-CN.md
)
*
[
logback组件
](
cn/Application-toolkit-logback-1.x-CN.md
)
*
[
Trace
](
cn/Application-toolkit-trace-CN.md
)
*
[
调用链跨线程传递
](
cn/Application-toolkit-trace-cross-thread-CN.md
)
*
测试用例
*
[
插件测试
](
https://github.com/SkywalkingTest/agent-integration-test-report
)
*
[
Java 探针性能测试
](
https://skywalkingtest.github.io/Agent-Benchmarks/README_zh.html
)
...
...
docs/cn/Application-toolkit-trace-cross-thread-CN.md
0 → 100644
浏览文件 @
daceca28
# 跨线程追踪
*
使用 maven 和 gradle 依赖相应的工具包
```
xml
<dependency>
<groupId>
org.apache.skywalking
</groupId>
<artifactId>
apm-toolkit-trace
</artifactId>
<version>
${skywalking.version}
</version>
</dependency>
```
*
使用方式一.
```
java
@TraceCrossThread
public
static
class
MyCallable
<
String
>
implements
Callable
<
String
>
{
@Override
public
String
call
()
throws
Exception
{
return
null
;
}
}
...
ExecutorService
executorService
=
Executors
.
newFixedThreadPool
(
1
);
executorService
.
submit
(
new
MyCallable
());
```
*
使用方式二.
```
java
ExecutorService
executorService
=
Executors
.
newFixedThreadPool
(
1
);
executorService
.
submit
(
CallableWrapper
.
of
(
new
Callable
<
String
>()
{
@Override
public
String
call
()
throws
Exception
{
return
null
;
}
}));
```
_示例代码,仅供参考_
docs/en/Application-toolkit-trace-cross-thread.md
0 → 100644
浏览文件 @
daceca28
# trace cross thread
*
Dependency the toolkit, such as using maven or gradle
```
xml
<dependency>
<groupId>
org.apache.skywalking
</groupId>
<artifactId>
apm-toolkit-trace
</artifactId>
<version>
${skywalking.version}
</version>
</dependency>
```
*
usage 1.
```
java
@TraceCrossThread
public
static
class
MyCallable
<
String
>
implements
Callable
<
String
>
{
@Override
public
String
call
()
throws
Exception
{
return
null
;
}
}
...
ExecutorService
executorService
=
Executors
.
newFixedThreadPool
(
1
);
executorService
.
submit
(
new
MyCallable
());
```
*
usage 2.
```
java
ExecutorService
executorService
=
Executors
.
newFixedThreadPool
(
1
);
executorService
.
submit
(
CallableWrapper
.
of
(
new
Callable
<
String
>()
{
@Override
public
String
call
()
throws
Exception
{
return
null
;
}
}));
```
_Sample codes only_
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录