Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
月轩居士
SkyWalking
提交
7c4c914a
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,发现更多精彩内容 >>
提交
7c4c914a
编写于
12月 17, 2017
作者:
P
peng-yongsheng
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Define analysis segment parser module that used for split segment.
上级
8e02787d
变更
33
隐藏空白更改
内联
并排
Showing
33 changed file
with
539 addition
and
80 deletion
+539
-80
apm-collector/apm-collector-agent/agent-grpc/agent-grpc-define/pom.xml
.../apm-collector-agent/agent-grpc/agent-grpc-define/pom.xml
+1
-2
apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/pom.xml
...pm-collector-agent/agent-grpc/agent-grpc-provider/pom.xml
+5
-0
apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/main/java/org/apache/skywalking/apm/collector/agent/grpc/provider/AgentModuleGRPCProvider.java
...ollector/agent/grpc/provider/AgentModuleGRPCProvider.java
+2
-1
apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/main/java/org/apache/skywalking/apm/collector/agent/grpc/provider/handler/TraceSegmentServiceHandler.java
...ent/grpc/provider/handler/TraceSegmentServiceHandler.java
+5
-6
apm-collector/apm-collector-analysis/analysis-segment-parser/pom.xml
...or/apm-collector-analysis/analysis-segment-parser/pom.xml
+36
-0
apm-collector/apm-collector-analysis/analysis-segment-parser/segment-parser-define/pom.xml
...sis/analysis-segment-parser/segment-parser-define/pom.xml
+40
-0
apm-collector/apm-collector-analysis/analysis-segment-parser/segment-parser-define/src/main/java/org/apache/skywalking/apm/collector/analysis/segment/parser/define/AnalysisSegmentParserModule.java
...is/segment/parser/define/AnalysisSegmentParserModule.java
+39
-0
apm-collector/apm-collector-analysis/analysis-segment-parser/segment-parser-define/src/main/java/org/apache/skywalking/apm/collector/analysis/segment/parser/define/decorator/ReferenceDecorator.java
...s/segment/parser/define/decorator/ReferenceDecorator.java
+1
-1
apm-collector/apm-collector-analysis/analysis-segment-parser/segment-parser-define/src/main/java/org/apache/skywalking/apm/collector/analysis/segment/parser/define/decorator/SegmentDecorator.java
...sis/segment/parser/define/decorator/SegmentDecorator.java
+1
-1
apm-collector/apm-collector-analysis/analysis-segment-parser/segment-parser-define/src/main/java/org/apache/skywalking/apm/collector/analysis/segment/parser/define/decorator/SpanDecorator.java
...alysis/segment/parser/define/decorator/SpanDecorator.java
+1
-1
apm-collector/apm-collector-analysis/analysis-segment-parser/segment-parser-define/src/main/java/org/apache/skywalking/apm/collector/analysis/segment/parser/define/decorator/StandardBuilder.java
...ysis/segment/parser/define/decorator/StandardBuilder.java
+1
-1
apm-collector/apm-collector-analysis/analysis-segment-parser/segment-parser-define/src/main/java/org/apache/skywalking/apm/collector/analysis/segment/parser/define/listener/EntrySpanListener.java
...sis/segment/parser/define/listener/EntrySpanListener.java
+3
-4
apm-collector/apm-collector-analysis/analysis-segment-parser/segment-parser-define/src/main/java/org/apache/skywalking/apm/collector/analysis/segment/parser/define/listener/ExitSpanListener.java
...ysis/segment/parser/define/listener/ExitSpanListener.java
+2
-3
apm-collector/apm-collector-analysis/analysis-segment-parser/segment-parser-define/src/main/java/org/apache/skywalking/apm/collector/analysis/segment/parser/define/listener/FirstSpanListener.java
...sis/segment/parser/define/listener/FirstSpanListener.java
+2
-3
apm-collector/apm-collector-analysis/analysis-segment-parser/segment-parser-define/src/main/java/org/apache/skywalking/apm/collector/analysis/segment/parser/define/listener/GlobalTraceIdsListener.java
...egment/parser/define/listener/GlobalTraceIdsListener.java
+1
-2
apm-collector/apm-collector-analysis/analysis-segment-parser/segment-parser-define/src/main/java/org/apache/skywalking/apm/collector/analysis/segment/parser/define/listener/LocalSpanListener.java
...sis/segment/parser/define/listener/LocalSpanListener.java
+2
-3
apm-collector/apm-collector-analysis/analysis-segment-parser/segment-parser-define/src/main/java/org/apache/skywalking/apm/collector/analysis/segment/parser/define/listener/SpanListener.java
...analysis/segment/parser/define/listener/SpanListener.java
+1
-2
apm-collector/apm-collector-analysis/analysis-segment-parser/segment-parser-define/src/main/java/org/apache/skywalking/apm/collector/analysis/segment/parser/define/service/ISegmentParseService.java
...s/segment/parser/define/service/ISegmentParseService.java
+33
-0
apm-collector/apm-collector-analysis/analysis-segment-parser/segment-parser-define/src/main/java/org/apache/skywalking/apm/collector/analysis/segment/parser/define/service/ISegmentParserListenerRegister.java
...parser/define/service/ISegmentParserListenerRegister.java
+29
-0
apm-collector/apm-collector-analysis/analysis-segment-parser/segment-parser-define/src/main/resources/META-INF/services/org.apache.skywalking.apm.collector.core.module.Module
...es/org.apache.skywalking.apm.collector.core.module.Module
+19
-0
apm-collector/apm-collector-analysis/analysis-segment-parser/segment-parser-provider/pom.xml
...s/analysis-segment-parser/segment-parser-provider/pom.xml
+40
-0
apm-collector/apm-collector-analysis/analysis-segment-parser/segment-parser-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/segment/parser/provider/AnalysisTraceParseModuleProvider.java
...ent/parser/provider/AnalysisTraceParseModuleProvider.java
+65
-0
apm-collector/apm-collector-analysis/analysis-segment-parser/segment-parser-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/segment/parser/provider/parser/SegmentParse.java
...analysis/segment/parser/provider/parser/SegmentParse.java
+27
-43
apm-collector/apm-collector-analysis/analysis-segment-parser/segment-parser-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/segment/parser/provider/parser/SegmentParserListenerManager.java
.../parser/provider/parser/SegmentParserListenerManager.java
+43
-0
apm-collector/apm-collector-analysis/analysis-segment-parser/segment-parser-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/segment/parser/provider/parser/standardization/IdExchanger.java
...t/parser/provider/parser/standardization/IdExchanger.java
+3
-1
apm-collector/apm-collector-analysis/analysis-segment-parser/segment-parser-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/segment/parser/provider/parser/standardization/ReferenceIdExchanger.java
...provider/parser/standardization/ReferenceIdExchanger.java
+2
-1
apm-collector/apm-collector-analysis/analysis-segment-parser/segment-parser-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/segment/parser/provider/parser/standardization/SegmentStandardization.java
...ovider/parser/standardization/SegmentStandardization.java
+1
-1
apm-collector/apm-collector-analysis/analysis-segment-parser/segment-parser-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/segment/parser/provider/parser/standardization/SegmentStandardizationWorker.java
.../parser/standardization/SegmentStandardizationWorker.java
+1
-1
apm-collector/apm-collector-analysis/analysis-segment-parser/segment-parser-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/segment/parser/provider/parser/standardization/SpanIdExchanger.java
...rser/provider/parser/standardization/SpanIdExchanger.java
+2
-2
apm-collector/apm-collector-analysis/analysis-segment-parser/segment-parser-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/segment/parser/provider/service/SegmentParseService.java
.../segment/parser/provider/service/SegmentParseService.java
+44
-0
apm-collector/apm-collector-analysis/analysis-segment-parser/segment-parser-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/segment/parser/provider/service/SegmentParserListenerRegister.java
...arser/provider/service/SegmentParserListenerRegister.java
+39
-0
apm-collector/apm-collector-analysis/analysis-segment-parser/segment-parser-provider/src/main/resources/META-INF/services/org.apache.skywalking.apm.collector.core.module.ModuleProvider
...pache.skywalking.apm.collector.core.module.ModuleProvider
+37
-0
apm-collector/apm-collector-analysis/pom.xml
apm-collector/apm-collector-analysis/pom.xml
+11
-1
未找到文件。
apm-collector/apm-collector-agent/agent-grpc/agent-grpc-define/pom.xml
浏览文件 @
7c4c914a
...
...
@@ -28,6 +28,5 @@
<modelVersion>
4.0.0
</modelVersion>
<artifactId>
agent-grpc-define
</artifactId>
<packaging>
jar
</packaging>
</project>
\ No newline at end of file
apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/pom.xml
浏览文件 @
7c4c914a
...
...
@@ -50,5 +50,10 @@
<artifactId>
collector-grpc-manager-define
</artifactId>
<version>
${project.version}
</version>
</dependency>
<dependency>
<groupId>
org.apache.skywalking
</groupId>
<artifactId>
segment-parser-define
</artifactId>
<version>
${project.version}
</version>
</dependency>
</dependencies>
</project>
\ No newline at end of file
apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/main/java/org/apache/skywalking/apm/collector/agent/grpc/provider/AgentModuleGRPCProvider.java
浏览文件 @
7c4c914a
...
...
@@ -27,6 +27,7 @@ import org.apache.skywalking.apm.collector.agent.grpc.provider.handler.ServiceNa
import
org.apache.skywalking.apm.collector.agent.grpc.provider.handler.TraceSegmentServiceHandler
;
import
org.apache.skywalking.apm.collector.agent.grpc.provider.handler.naming.AgentGRPCNamingHandler
;
import
org.apache.skywalking.apm.collector.agent.grpc.provider.handler.naming.AgentGRPCNamingListener
;
import
org.apache.skywalking.apm.collector.analysis.segment.parser.define.AnalysisSegmentParserModule
;
import
org.apache.skywalking.apm.collector.cluster.ClusterModule
;
import
org.apache.skywalking.apm.collector.cluster.service.ModuleListenerService
;
import
org.apache.skywalking.apm.collector.cluster.service.ModuleRegisterService
;
...
...
@@ -85,7 +86,7 @@ public class AgentModuleGRPCProvider extends ModuleProvider {
}
@Override
public
String
[]
requiredModules
()
{
return
new
String
[]
{
ClusterModule
.
NAME
,
NamingModule
.
NAME
,
GRPCManagerModule
.
NAME
};
return
new
String
[]
{
ClusterModule
.
NAME
,
NamingModule
.
NAME
,
GRPCManagerModule
.
NAME
,
AnalysisSegmentParserModule
.
NAME
};
}
private
void
addHandlers
(
Server
gRPCServer
)
{
...
...
apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/main/java/org/apache/skywalking/apm/collector/agent/grpc/provider/handler/TraceSegmentServiceHandler.java
浏览文件 @
7c4c914a
...
...
@@ -16,12 +16,11 @@
*
*/
package
org.apache.skywalking.apm.collector.agent.grpc.provider.handler
;
import
io.grpc.stub.StreamObserver
;
import
org.apache.skywalking.apm.collector.a
gent.stream.AgentStream
Module
;
import
org.apache.skywalking.apm.collector.a
gent.stream.service.trace.ITraceSegment
Service
;
import
org.apache.skywalking.apm.collector.a
nalysis.segment.parser.define.AnalysisSegmentParser
Module
;
import
org.apache.skywalking.apm.collector.a
nalysis.segment.parser.define.service.ISegmentParse
Service
;
import
org.apache.skywalking.apm.collector.core.module.ModuleManager
;
import
org.apache.skywalking.apm.collector.server.grpc.GRPCHandler
;
import
org.apache.skywalking.apm.network.proto.Downstream
;
...
...
@@ -37,17 +36,17 @@ public class TraceSegmentServiceHandler extends TraceSegmentServiceGrpc.TraceSeg
private
final
Logger
logger
=
LoggerFactory
.
getLogger
(
TraceSegmentServiceHandler
.
class
);
private
final
I
TraceSegmentService
traceSegment
Service
;
private
final
I
SegmentParseService
segmentParse
Service
;
public
TraceSegmentServiceHandler
(
ModuleManager
moduleManager
)
{
this
.
traceSegmentService
=
moduleManager
.
find
(
AgentStreamModule
.
NAME
).
getService
(
ITraceSegment
Service
.
class
);
this
.
segmentParseService
=
moduleManager
.
find
(
AnalysisSegmentParserModule
.
NAME
).
getService
(
ISegmentParse
Service
.
class
);
}
@Override
public
StreamObserver
<
UpstreamSegment
>
collect
(
StreamObserver
<
Downstream
>
responseObserver
)
{
return
new
StreamObserver
<
UpstreamSegment
>()
{
@Override
public
void
onNext
(
UpstreamSegment
segment
)
{
logger
.
debug
(
"receive segment"
);
traceSegmentService
.
send
(
segm
ent
);
segmentParseService
.
parse
(
segment
,
ISegmentParseService
.
Source
.
Ag
ent
);
}
@Override
public
void
onError
(
Throwable
throwable
)
{
...
...
apm-collector/apm-collector-analysis/analysis-segment-parser/pom.xml
0 → 100644
浏览文件 @
7c4c914a
<?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"
>
<parent>
<artifactId>
apm-collector-analysis
</artifactId>
<groupId>
org.apache.skywalking
</groupId>
<version>
5.0.0-alpha
</version>
</parent>
<modelVersion>
4.0.0
</modelVersion>
<artifactId>
analysis-segment-parser
</artifactId>
<packaging>
pom
</packaging>
<modules>
<module>
segment-parser-define
</module>
<module>
segment-parser-provider
</module>
</modules>
</project>
\ No newline at end of file
apm-collector/apm-collector-analysis/analysis-segment-parser/segment-parser-define/pom.xml
0 → 100644
浏览文件 @
7c4c914a
<?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"
>
<parent>
<artifactId>
analysis-segment-parser
</artifactId>
<groupId>
org.apache.skywalking
</groupId>
<version>
5.0.0-alpha
</version>
</parent>
<modelVersion>
4.0.0
</modelVersion>
<artifactId>
segment-parser-define
</artifactId>
<packaging>
jar
</packaging>
<dependencies>
<dependency>
<groupId>
org.apache.skywalking
</groupId>
<artifactId>
apm-network
</artifactId>
<version>
${project.version}
</version>
</dependency>
</dependencies>
</project>
\ No newline at end of file
apm-collector/apm-collector-analysis/analysis-segment-parser/segment-parser-define/src/main/java/org/apache/skywalking/apm/collector/analysis/segment/parser/define/AnalysisSegmentParserModule.java
0 → 100644
浏览文件 @
7c4c914a
/*
* 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.collector.analysis.segment.parser.define
;
import
org.apache.skywalking.apm.collector.analysis.segment.parser.define.service.ISegmentParseService
;
import
org.apache.skywalking.apm.collector.analysis.segment.parser.define.service.ISegmentParserListenerRegister
;
import
org.apache.skywalking.apm.collector.core.module.Module
;
/**
* @author peng-yongsheng
*/
public
class
AnalysisSegmentParserModule
extends
Module
{
public
static
final
String
NAME
=
"analysis_segment_parser"
;
@Override
public
String
name
()
{
return
NAME
;
}
@Override
public
Class
[]
services
()
{
return
new
Class
[]
{
ISegmentParseService
.
class
,
ISegmentParserListenerRegister
.
class
};
}
}
apm-collector/apm-collector-a
gent-stream/collector-agent-stream-provider/src/main/java/org/apache/skywalking/apm/collector/agent/stream/parser/standardization
/ReferenceDecorator.java
→
apm-collector/apm-collector-a
nalysis/analysis-segment-parser/segment-parser-define/src/main/java/org/apache/skywalking/apm/collector/analysis/segment/parser/define/decorator
/ReferenceDecorator.java
浏览文件 @
7c4c914a
...
...
@@ -17,7 +17,7 @@
*/
package
org.apache.skywalking.apm.collector.a
gent.stream.parser.standardization
;
package
org.apache.skywalking.apm.collector.a
nalysis.segment.parser.define.decorator
;
import
org.apache.skywalking.apm.network.proto.RefType
;
import
org.apache.skywalking.apm.network.proto.TraceSegmentReference
;
...
...
apm-collector/apm-collector-a
gent-stream/collector-agent-stream-provider/src/main/java/org/apache/skywalking/apm/collector/agent/stream/parser/standardization
/SegmentDecorator.java
→
apm-collector/apm-collector-a
nalysis/analysis-segment-parser/segment-parser-define/src/main/java/org/apache/skywalking/apm/collector/analysis/segment/parser/define/decorator
/SegmentDecorator.java
浏览文件 @
7c4c914a
...
...
@@ -17,7 +17,7 @@
*/
package
org.apache.skywalking.apm.collector.a
gent.stream.parser.standardization
;
package
org.apache.skywalking.apm.collector.a
nalysis.segment.parser.define.decorator
;
import
org.apache.skywalking.apm.network.proto.TraceSegmentObject
;
import
org.apache.skywalking.apm.network.proto.UniqueId
;
...
...
apm-collector/apm-collector-a
gent-stream/collector-agent-stream-provider/src/main/java/org/apache/skywalking/apm/collector/agent/stream/parser/standardization
/SpanDecorator.java
→
apm-collector/apm-collector-a
nalysis/analysis-segment-parser/segment-parser-define/src/main/java/org/apache/skywalking/apm/collector/analysis/segment/parser/define/decorator
/SpanDecorator.java
浏览文件 @
7c4c914a
...
...
@@ -17,7 +17,7 @@
*/
package
org.apache.skywalking.apm.collector.a
gent.stream.parser.standardization
;
package
org.apache.skywalking.apm.collector.a
nalysis.segment.parser.define.decorator
;
import
org.apache.skywalking.apm.network.proto.SpanLayer
;
import
org.apache.skywalking.apm.network.proto.SpanObject
;
...
...
apm-collector/apm-collector-a
gent-stream/collector-agent-stream-provider/src/main/java/org/apache/skywalking/apm/collector/agent/stream/parser/standardization
/StandardBuilder.java
→
apm-collector/apm-collector-a
nalysis/analysis-segment-parser/segment-parser-define/src/main/java/org/apache/skywalking/apm/collector/analysis/segment/parser/define/decorator
/StandardBuilder.java
浏览文件 @
7c4c914a
...
...
@@ -17,7 +17,7 @@
*/
package
org.apache.skywalking.apm.collector.a
gent.stream.parser.standardization
;
package
org.apache.skywalking.apm.collector.a
nalysis.segment.parser.define.decorator
;
/**
* @author peng-yongsheng
...
...
apm-collector/apm-collector-a
gent-stream/collector-agent-stream-provider/src/main/java/org/apache/skywalking/apm/collector/agent/stream/pars
er/EntrySpanListener.java
→
apm-collector/apm-collector-a
nalysis/analysis-segment-parser/segment-parser-define/src/main/java/org/apache/skywalking/apm/collector/analysis/segment/parser/define/listen
er/EntrySpanListener.java
浏览文件 @
7c4c914a
...
...
@@ -16,14 +16,13 @@
*
*/
package
org.apache.skywalking.apm.collector.analysis.segment.parser.define.listener
;
package
org.apache.skywalking.apm.collector.agent.stream.parser
;
import
org.apache.skywalking.apm.collector.agent.stream.parser.standardization.SpanDecorator
;
import
org.apache.skywalking.apm.collector.analysis.segment.parser.define.decorator.SpanDecorator
;
/**
* @author peng-yongsheng
*/
public
interface
EntrySpanListener
extends
SpanListener
{
void
parseEntry
(
SpanDecorator
spanDecorator
,
int
applicationId
,
int
instanceId
,
String
segmentId
);
}
}
\ No newline at end of file
apm-collector/apm-collector-a
gent-stream/collector-agent-stream-provider/src/main/java/org/apache/skywalking/apm/collector/agent/stream/pars
er/ExitSpanListener.java
→
apm-collector/apm-collector-a
nalysis/analysis-segment-parser/segment-parser-define/src/main/java/org/apache/skywalking/apm/collector/analysis/segment/parser/define/listen
er/ExitSpanListener.java
浏览文件 @
7c4c914a
...
...
@@ -16,10 +16,9 @@
*
*/
package
org.apache.skywalking.apm.collector.analysis.segment.parser.define.listener
;
package
org.apache.skywalking.apm.collector.agent.stream.parser
;
import
org.apache.skywalking.apm.collector.agent.stream.parser.standardization.SpanDecorator
;
import
org.apache.skywalking.apm.collector.analysis.segment.parser.define.decorator.SpanDecorator
;
/**
* @author peng-yongsheng
...
...
apm-collector/apm-collector-a
gent-stream/collector-agent-stream-provider/src/main/java/org/apache/skywalking/apm/collector/agent/stream/pars
er/FirstSpanListener.java
→
apm-collector/apm-collector-a
nalysis/analysis-segment-parser/segment-parser-define/src/main/java/org/apache/skywalking/apm/collector/analysis/segment/parser/define/listen
er/FirstSpanListener.java
浏览文件 @
7c4c914a
...
...
@@ -16,10 +16,9 @@
*
*/
package
org.apache.skywalking.apm.collector.analysis.segment.parser.define.listener
;
package
org.apache.skywalking.apm.collector.agent.stream.parser
;
import
org.apache.skywalking.apm.collector.agent.stream.parser.standardization.SpanDecorator
;
import
org.apache.skywalking.apm.collector.analysis.segment.parser.define.decorator.SpanDecorator
;
/**
* @author peng-yongsheng
...
...
apm-collector/apm-collector-a
gent-stream/collector-agent-stream-provider/src/main/java/org/apache/skywalking/apm/collector/agent/stream/pars
er/GlobalTraceIdsListener.java
→
apm-collector/apm-collector-a
nalysis/analysis-segment-parser/segment-parser-define/src/main/java/org/apache/skywalking/apm/collector/analysis/segment/parser/define/listen
er/GlobalTraceIdsListener.java
浏览文件 @
7c4c914a
...
...
@@ -16,8 +16,7 @@
*
*/
package
org.apache.skywalking.apm.collector.agent.stream.parser
;
package
org.apache.skywalking.apm.collector.analysis.segment.parser.define.listener
;
import
org.apache.skywalking.apm.network.proto.UniqueId
;
...
...
apm-collector/apm-collector-a
gent-stream/collector-agent-stream-provider/src/main/java/org/apache/skywalking/apm/collector/agent/stream/pars
er/LocalSpanListener.java
→
apm-collector/apm-collector-a
nalysis/analysis-segment-parser/segment-parser-define/src/main/java/org/apache/skywalking/apm/collector/analysis/segment/parser/define/listen
er/LocalSpanListener.java
浏览文件 @
7c4c914a
...
...
@@ -16,10 +16,9 @@
*
*/
package
org.apache.skywalking.apm.collector.analysis.segment.parser.define.listener
;
package
org.apache.skywalking.apm.collector.agent.stream.parser
;
import
org.apache.skywalking.apm.collector.agent.stream.parser.standardization.SpanDecorator
;
import
org.apache.skywalking.apm.collector.analysis.segment.parser.define.decorator.SpanDecorator
;
/**
* @author peng-yongsheng
...
...
apm-collector/apm-collector-a
gent-stream/collector-agent-stream-provider/src/main/java/org/apache/skywalking/apm/collector/agent/stream/pars
er/SpanListener.java
→
apm-collector/apm-collector-a
nalysis/analysis-segment-parser/segment-parser-define/src/main/java/org/apache/skywalking/apm/collector/analysis/segment/parser/define/listen
er/SpanListener.java
浏览文件 @
7c4c914a
...
...
@@ -16,8 +16,7 @@
*
*/
package
org.apache.skywalking.apm.collector.agent.stream.parser
;
package
org.apache.skywalking.apm.collector.analysis.segment.parser.define.listener
;
/**
* @author peng-yongsheng
...
...
apm-collector/apm-collector-analysis/analysis-segment-parser/segment-parser-define/src/main/java/org/apache/skywalking/apm/collector/analysis/segment/parser/define/service/ISegmentParseService.java
0 → 100644
浏览文件 @
7c4c914a
/*
* 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.collector.analysis.segment.parser.define.service
;
import
org.apache.skywalking.apm.collector.core.module.Service
;
import
org.apache.skywalking.apm.network.proto.UpstreamSegment
;
/**
* @author peng-yongsheng
*/
public
interface
ISegmentParseService
extends
Service
{
void
parse
(
UpstreamSegment
segment
,
Source
source
);
enum
Source
{
Agent
,
Buffer
}
}
apm-collector/apm-collector-analysis/analysis-segment-parser/segment-parser-define/src/main/java/org/apache/skywalking/apm/collector/analysis/segment/parser/define/service/ISegmentParserListenerRegister.java
0 → 100644
浏览文件 @
7c4c914a
/*
* 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.collector.analysis.segment.parser.define.service
;
import
org.apache.skywalking.apm.collector.analysis.segment.parser.define.listener.SpanListener
;
import
org.apache.skywalking.apm.collector.core.module.Service
;
/**
* @author peng-yongsheng
*/
public
interface
ISegmentParserListenerRegister
extends
Service
{
void
register
(
SpanListener
spanListener
);
}
apm-collector/apm-collector-analysis/analysis-segment-parser/segment-parser-define/src/main/resources/META-INF/services/org.apache.skywalking.apm.collector.core.module.Module
0 → 100644
浏览文件 @
7c4c914a
#
# 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.
#
#
org
.
apache
.
skywalking
.
apm
.
collector
.
analysis
.
segment
.
parser
.
define
.
AnalysisSegmentParserModule
\ No newline at end of file
apm-collector/apm-collector-analysis/analysis-segment-parser/segment-parser-provider/pom.xml
0 → 100644
浏览文件 @
7c4c914a
<?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"
>
<parent>
<artifactId>
analysis-segment-parser
</artifactId>
<groupId>
org.apache.skywalking
</groupId>
<version>
5.0.0-alpha
</version>
</parent>
<modelVersion>
4.0.0
</modelVersion>
<artifactId>
segment-parser-provider
</artifactId>
<packaging>
jar
</packaging>
<dependencies>
<dependency>
<groupId>
org.apache.skywalking
</groupId>
<artifactId>
segment-parser-define
</artifactId>
<version>
${project.version}
</version>
</dependency>
</dependencies>
</project>
\ No newline at end of file
apm-collector/apm-collector-analysis/analysis-segment-parser/segment-parser-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/segment/parser/provider/AnalysisTraceParseModuleProvider.java
0 → 100644
浏览文件 @
7c4c914a
/*
* 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.collector.analysis.segment.parser.provider
;
import
java.util.Properties
;
import
org.apache.skywalking.apm.collector.analysis.segment.parser.define.AnalysisSegmentParserModule
;
import
org.apache.skywalking.apm.collector.analysis.segment.parser.define.service.ISegmentParseService
;
import
org.apache.skywalking.apm.collector.analysis.segment.parser.define.service.ISegmentParserListenerRegister
;
import
org.apache.skywalking.apm.collector.analysis.segment.parser.provider.parser.SegmentParserListenerManager
;
import
org.apache.skywalking.apm.collector.analysis.segment.parser.provider.service.SegmentParseService
;
import
org.apache.skywalking.apm.collector.analysis.segment.parser.provider.service.SegmentParserListenerRegister
;
import
org.apache.skywalking.apm.collector.core.module.Module
;
import
org.apache.skywalking.apm.collector.core.module.ModuleProvider
;
import
org.apache.skywalking.apm.collector.core.module.ServiceNotProvidedException
;
/**
* @author peng-yongsheng
*/
public
class
AnalysisTraceParseModuleProvider
extends
ModuleProvider
{
public
static
final
String
NAME
=
"default"
;
private
SegmentParserListenerManager
listenerManager
;
@Override
public
String
name
()
{
return
NAME
;
}
@Override
public
Class
<?
extends
Module
>
module
()
{
return
AnalysisSegmentParserModule
.
class
;
}
@Override
public
void
prepare
(
Properties
config
)
throws
ServiceNotProvidedException
{
this
.
listenerManager
=
new
SegmentParserListenerManager
();
this
.
registerServiceImplementation
(
ISegmentParserListenerRegister
.
class
,
new
SegmentParserListenerRegister
(
listenerManager
));
this
.
registerServiceImplementation
(
ISegmentParseService
.
class
,
new
SegmentParseService
(
getManager
(),
listenerManager
));
}
@Override
public
void
start
(
Properties
config
)
throws
ServiceNotProvidedException
{
}
@Override
public
void
notifyAfterCompleted
()
throws
ServiceNotProvidedException
{
}
@Override
public
String
[]
requiredModules
()
{
return
new
String
[
0
];
}
}
apm-collector/apm-collector-a
gent-stream/collector-agent-stream-provider/src/main/java/org/apache/skywalking/apm/collector/agent/stream
/parser/SegmentParse.java
→
apm-collector/apm-collector-a
nalysis/analysis-segment-parser/segment-parser-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/segment/parser/provider
/parser/SegmentParse.java
浏览文件 @
7c4c914a
...
...
@@ -16,33 +16,29 @@
*
*/
package
org.apache.skywalking.apm.collector.agent.stream.parser
;
package
org.apache.skywalking.apm.collector.analysis.segment.parser.provider.parser
;
import
com.google.protobuf.InvalidProtocolBufferException
;
import
java.util.ArrayList
;
import
java.util.List
;
import
org.apache.skywalking.apm.collector.agent.stream.parser.standardization.ReferenceIdExchanger
;
import
org.apache.skywalking.apm.collector.agent.stream.parser.standardization.SegmentDecorator
;
import
org.apache.skywalking.apm.collector.agent.stream.worker.trace.service.ServiceEntrySpanListener
;
import
org.apache.skywalking.apm.collector.core.graph.GraphManager
;
import
org.apache.skywalking.apm.collector.agent.stream.graph.TraceStreamGraph
;
import
org.apache.skywalking.apm.collector.agent.stream.parser.standardization.ReferenceDecorator
;
import
org.apache.skywalking.apm.collector.agent.stream.parser.standardization.SegmentStandardization
;
import
org.apache.skywalking.apm.collector.agent.stream.parser.standardization.SpanDecorator
;
import
org.apache.skywalking.apm.collector.agent.stream.parser.standardization.SpanIdExchanger
;
import
org.apache.skywalking.apm.collector.agent.stream.worker.trace.application.ApplicationComponentSpanListener
;
import
org.apache.skywalking.apm.collector.agent.stream.worker.trace.application.ApplicationMappingSpanListener
;
import
org.apache.skywalking.apm.collector.agent.stream.worker.trace.application.ApplicationReferenceMetricSpanListener
;
import
org.apache.skywalking.apm.collector.agent.stream.worker.trace.global.GlobalTraceSpanListener
;
import
org.apache.skywalking.apm.collector.agent.stream.worker.trace.instance.InstanceMetricSpanListener
;
import
org.apache.skywalking.apm.collector.agent.stream.worker.trace.segment.SegmentCostSpanListener
;
import
org.apache.skywalking.apm.collector.agent.stream.worker.trace.service.ServiceReferenceMetricSpanListener
;
import
javax.swing.text.Segment
;
import
org.apache.skywalking.apm.collector.analysis.segment.parser.define.decorator.ReferenceDecorator
;
import
org.apache.skywalking.apm.collector.analysis.segment.parser.define.decorator.SegmentDecorator
;
import
org.apache.skywalking.apm.collector.analysis.segment.parser.define.decorator.SpanDecorator
;
import
org.apache.skywalking.apm.collector.analysis.segment.parser.define.listener.EntrySpanListener
;
import
org.apache.skywalking.apm.collector.analysis.segment.parser.define.listener.ExitSpanListener
;
import
org.apache.skywalking.apm.collector.analysis.segment.parser.define.listener.FirstSpanListener
;
import
org.apache.skywalking.apm.collector.analysis.segment.parser.define.listener.GlobalTraceIdsListener
;
import
org.apache.skywalking.apm.collector.analysis.segment.parser.define.listener.LocalSpanListener
;
import
org.apache.skywalking.apm.collector.analysis.segment.parser.define.listener.SpanListener
;
import
org.apache.skywalking.apm.collector.analysis.segment.parser.define.service.ISegmentParseService
;
import
org.apache.skywalking.apm.collector.analysis.segment.parser.provider.parser.standardization.ReferenceIdExchanger
;
import
org.apache.skywalking.apm.collector.analysis.segment.parser.provider.parser.standardization.SegmentStandardization
;
import
org.apache.skywalking.apm.collector.analysis.segment.parser.provider.parser.standardization.SpanIdExchanger
;
import
org.apache.skywalking.apm.collector.core.UnexpectedException
;
import
org.apache.skywalking.apm.collector.core.graph.Graph
;
import
org.apache.skywalking.apm.collector.core.graph.GraphManager
;
import
org.apache.skywalking.apm.collector.core.module.ModuleManager
;
import
org.apache.skywalking.apm.collector.core.util.TimeBucketUtils
;
import
org.apache.skywalking.apm.collector.storage.table.segment.Segment
;
import
org.apache.skywalking.apm.network.proto.SpanType
;
import
org.apache.skywalking.apm.network.proto.TraceSegmentObject
;
import
org.apache.skywalking.apm.network.proto.UniqueId
;
...
...
@@ -57,25 +53,17 @@ public class SegmentParse {
private
final
Logger
logger
=
LoggerFactory
.
getLogger
(
SegmentParse
.
class
);
private
final
List
<
SpanListener
>
spanListeners
;
private
final
ModuleManager
moduleManager
;
private
final
SegmentParserListenerManager
listenerManager
;
private
String
segmentId
;
private
long
timeBucket
=
0
;
public
SegmentParse
(
ModuleManager
moduleManager
)
{
public
SegmentParse
(
ModuleManager
moduleManager
,
SegmentParserListenerManager
listenerManager
)
{
this
.
moduleManager
=
moduleManager
;
this
.
spanListeners
=
new
ArrayList
<>();
this
.
spanListeners
.
add
(
new
ApplicationComponentSpanListener
());
this
.
spanListeners
.
add
(
new
ApplicationMappingSpanListener
());
this
.
spanListeners
.
add
(
new
ApplicationReferenceMetricSpanListener
(
moduleManager
));
this
.
spanListeners
.
add
(
new
SegmentCostSpanListener
(
moduleManager
));
this
.
spanListeners
.
add
(
new
GlobalTraceSpanListener
());
this
.
spanListeners
.
add
(
new
ServiceEntrySpanListener
(
moduleManager
));
this
.
spanListeners
.
add
(
new
ServiceReferenceMetricSpanListener
());
this
.
spanListeners
.
add
(
new
InstanceMetricSpanListener
());
this
.
listenerManager
=
listenerManager
;
}
public
boolean
parse
(
UpstreamSegment
segment
,
Source
source
)
{
public
boolean
parse
(
UpstreamSegment
segment
,
ISegmentParseService
.
Source
source
)
{
try
{
List
<
UniqueId
>
traceIds
=
segment
.
getGlobalTraceIdsList
();
TraceSegmentObject
segmentObject
=
TraceSegmentObject
.
parseFrom
(
segment
.
getSegment
());
...
...
@@ -85,7 +73,7 @@ public class SegmentParse {
if
(!
preBuild
(
traceIds
,
segmentDecorator
))
{
logger
.
debug
(
"This segment id exchange not success, write to buffer file, id: {}"
,
segmentId
);
if
(
source
.
equals
(
Source
.
Agent
))
{
if
(
source
.
equals
(
ISegmentParseService
.
Source
.
Agent
))
{
writeToBufferFile
(
segmentId
,
segment
);
}
return
false
;
...
...
@@ -184,12 +172,12 @@ public class SegmentParse {
}
private
void
notifyListenerToBuild
()
{
spanListeners
.
forEach
(
SpanListener:
:
build
);
listenerManager
.
getSpanListeners
()
.
forEach
(
SpanListener:
:
build
);
}
private
void
notifyExitListener
(
SpanDecorator
spanDecorator
,
int
applicationId
,
int
applicationInstanceId
,
String
segmentId
)
{
for
(
SpanListener
listener
:
spanListeners
)
{
for
(
SpanListener
listener
:
listenerManager
.
getSpanListeners
()
)
{
if
(
listener
instanceof
ExitSpanListener
)
{
((
ExitSpanListener
)
listener
).
parseExit
(
spanDecorator
,
applicationId
,
applicationInstanceId
,
segmentId
);
}
...
...
@@ -198,7 +186,7 @@ public class SegmentParse {
private
void
notifyEntryListener
(
SpanDecorator
spanDecorator
,
int
applicationId
,
int
applicationInstanceId
,
String
segmentId
)
{
for
(
SpanListener
listener
:
spanListeners
)
{
for
(
SpanListener
listener
:
listenerManager
.
getSpanListeners
()
)
{
if
(
listener
instanceof
EntrySpanListener
)
{
((
EntrySpanListener
)
listener
).
parseEntry
(
spanDecorator
,
applicationId
,
applicationInstanceId
,
segmentId
);
}
...
...
@@ -207,7 +195,7 @@ public class SegmentParse {
private
void
notifyLocalListener
(
SpanDecorator
spanDecorator
,
int
applicationId
,
int
applicationInstanceId
,
String
segmentId
)
{
for
(
SpanListener
listener
:
spanListeners
)
{
for
(
SpanListener
listener
:
listenerManager
.
getSpanListeners
()
)
{
if
(
listener
instanceof
LocalSpanListener
)
{
((
LocalSpanListener
)
listener
).
parseLocal
(
spanDecorator
,
applicationId
,
applicationInstanceId
,
segmentId
);
}
...
...
@@ -216,7 +204,7 @@ public class SegmentParse {
private
void
notifyFirstListener
(
SpanDecorator
spanDecorator
,
int
applicationId
,
int
applicationInstanceId
,
String
segmentId
)
{
for
(
SpanListener
listener
:
spanListeners
)
{
for
(
SpanListener
listener
:
listenerManager
.
getSpanListeners
()
)
{
if
(
listener
instanceof
FirstSpanListener
)
{
((
FirstSpanListener
)
listener
).
parseFirst
(
spanDecorator
,
applicationId
,
applicationInstanceId
,
segmentId
);
}
...
...
@@ -224,14 +212,10 @@ public class SegmentParse {
}
private
void
notifyGlobalsListener
(
UniqueId
uniqueId
)
{
for
(
SpanListener
listener
:
spanListeners
)
{
for
(
SpanListener
listener
:
listenerManager
.
getSpanListeners
()
)
{
if
(
listener
instanceof
GlobalTraceIdsListener
)
{
((
GlobalTraceIdsListener
)
listener
).
parseGlobalTraceId
(
uniqueId
);
}
}
}
public
enum
Source
{
Agent
,
Buffer
}
}
apm-collector/apm-collector-analysis/analysis-segment-parser/segment-parser-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/segment/parser/provider/parser/SegmentParserListenerManager.java
0 → 100644
浏览文件 @
7c4c914a
/*
* 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.collector.analysis.segment.parser.provider.parser
;
import
java.util.ArrayList
;
import
java.util.List
;
import
org.apache.skywalking.apm.collector.analysis.segment.parser.define.listener.SpanListener
;
/**
* @author peng-yongsheng
*/
public
class
SegmentParserListenerManager
{
private
List
<
SpanListener
>
spanListeners
;
public
SegmentParserListenerManager
()
{
this
.
spanListeners
=
new
ArrayList
<>();
}
public
void
add
(
SpanListener
spanListener
)
{
spanListeners
.
add
(
spanListener
);
}
public
List
<
SpanListener
>
getSpanListeners
()
{
return
spanListeners
;
}
}
apm-collector/apm-collector-a
gent-stream/collector-agent-stream-provider/src/main/java/org/apache/skywalking/apm/collector/agent/stream
/parser/standardization/IdExchanger.java
→
apm-collector/apm-collector-a
nalysis/analysis-segment-parser/segment-parser-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/segment/parser/provider
/parser/standardization/IdExchanger.java
浏览文件 @
7c4c914a
...
...
@@ -17,7 +17,9 @@
*/
package
org.apache.skywalking.apm.collector.agent.stream.parser.standardization
;
package
org.apache.skywalking.apm.collector.analysis.segment.parser.provider.parser.standardization
;
import
org.apache.skywalking.apm.collector.analysis.segment.parser.define.decorator.StandardBuilder
;
/**
* @author peng-yongsheng
...
...
apm-collector/apm-collector-a
gent-stream/collector-agent-stream-provider/src/main/java/org/apache/skywalking/apm/collector/agent/stream
/parser/standardization/ReferenceIdExchanger.java
→
apm-collector/apm-collector-a
nalysis/analysis-segment-parser/segment-parser-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/segment/parser/provider
/parser/standardization/ReferenceIdExchanger.java
浏览文件 @
7c4c914a
...
...
@@ -17,8 +17,9 @@
*/
package
org.apache.skywalking.apm.collector.a
gent.stream
.parser.standardization
;
package
org.apache.skywalking.apm.collector.a
nalysis.segment.parser.provider
.parser.standardization
;
import
org.apache.skywalking.apm.collector.analysis.segment.parser.define.decorator.ReferenceDecorator
;
import
org.apache.skywalking.apm.collector.core.util.Const
;
import
org.apache.skywalking.apm.collector.agent.stream.worker.register.ApplicationIDService
;
import
org.apache.skywalking.apm.collector.agent.stream.worker.register.ServiceNameService
;
...
...
apm-collector/apm-collector-a
gent-stream/collector-agent-stream-provider/src/main/java/org/apache/skywalking/apm/collector/agent/stream
/parser/standardization/SegmentStandardization.java
→
apm-collector/apm-collector-a
nalysis/analysis-segment-parser/segment-parser-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/segment/parser/provider
/parser/standardization/SegmentStandardization.java
浏览文件 @
7c4c914a
...
...
@@ -17,7 +17,7 @@
*/
package
org.apache.skywalking.apm.collector.a
gent.stream
.parser.standardization
;
package
org.apache.skywalking.apm.collector.a
nalysis.segment.parser.provider
.parser.standardization
;
import
org.apache.skywalking.apm.collector.core.data.EndOfBatchQueueMessage
;
import
org.apache.skywalking.apm.network.proto.UpstreamSegment
;
...
...
apm-collector/apm-collector-a
gent-stream/collector-agent-stream-provider/src/main/java/org/apache/skywalking/apm/collector/agent/stream
/parser/standardization/SegmentStandardizationWorker.java
→
apm-collector/apm-collector-a
nalysis/analysis-segment-parser/segment-parser-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/segment/parser/provider
/parser/standardization/SegmentStandardizationWorker.java
浏览文件 @
7c4c914a
...
...
@@ -17,7 +17,7 @@
*/
package
org.apache.skywalking.apm.collector.a
gent.stream
.parser.standardization
;
package
org.apache.skywalking.apm.collector.a
nalysis.segment.parser.provider
.parser.standardization
;
import
java.util.concurrent.Executors
;
import
java.util.concurrent.TimeUnit
;
...
...
apm-collector/apm-collector-a
gent-stream/collector-agent-stream-provider/src/main/java/org/apache/skywalking/apm/collector/agent/stream
/parser/standardization/SpanIdExchanger.java
→
apm-collector/apm-collector-a
nalysis/analysis-segment-parser/segment-parser-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/segment/parser/provider
/parser/standardization/SpanIdExchanger.java
浏览文件 @
7c4c914a
...
...
@@ -16,11 +16,11 @@
*
*/
package
org.apache.skywalking.apm.collector.agent.stream.parser.standardization
;
package
org.apache.skywalking.apm.collector.analysis.segment.parser.provider.parser.standardization
;
import
org.apache.skywalking.apm.collector.agent.stream.worker.register.ApplicationIDService
;
import
org.apache.skywalking.apm.collector.agent.stream.worker.register.ServiceNameService
;
import
org.apache.skywalking.apm.collector.analysis.segment.parser.define.decorator.SpanDecorator
;
import
org.apache.skywalking.apm.collector.core.module.ModuleManager
;
import
org.apache.skywalking.apm.collector.core.util.Const
;
import
org.apache.skywalking.apm.collector.core.util.StringUtils
;
...
...
apm-collector/apm-collector-analysis/analysis-segment-parser/segment-parser-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/segment/parser/provider/service/SegmentParseService.java
0 → 100644
浏览文件 @
7c4c914a
/*
* 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.collector.analysis.segment.parser.provider.service
;
import
org.apache.skywalking.apm.collector.analysis.segment.parser.define.service.ISegmentParseService
;
import
org.apache.skywalking.apm.collector.analysis.segment.parser.provider.parser.SegmentParse
;
import
org.apache.skywalking.apm.collector.analysis.segment.parser.provider.parser.SegmentParserListenerManager
;
import
org.apache.skywalking.apm.collector.core.module.ModuleManager
;
import
org.apache.skywalking.apm.network.proto.UpstreamSegment
;
/**
* @author peng-yongsheng
*/
public
class
SegmentParseService
implements
ISegmentParseService
{
private
final
ModuleManager
moduleManager
;
private
final
SegmentParserListenerManager
listenerManager
;
public
SegmentParseService
(
ModuleManager
moduleManager
,
SegmentParserListenerManager
listenerManager
)
{
this
.
moduleManager
=
moduleManager
;
this
.
listenerManager
=
listenerManager
;
}
@Override
public
void
parse
(
UpstreamSegment
segment
,
Source
source
)
{
SegmentParse
segmentParse
=
new
SegmentParse
(
moduleManager
,
listenerManager
);
segmentParse
.
parse
(
segment
,
source
);
}
}
apm-collector/apm-collector-analysis/analysis-segment-parser/segment-parser-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/segment/parser/provider/service/SegmentParserListenerRegister.java
0 → 100644
浏览文件 @
7c4c914a
/*
* 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.collector.analysis.segment.parser.provider.service
;
import
org.apache.skywalking.apm.collector.analysis.segment.parser.define.listener.SpanListener
;
import
org.apache.skywalking.apm.collector.analysis.segment.parser.define.service.ISegmentParserListenerRegister
;
import
org.apache.skywalking.apm.collector.analysis.segment.parser.provider.parser.SegmentParserListenerManager
;
/**
* @author peng-yongsheng
*/
public
class
SegmentParserListenerRegister
implements
ISegmentParserListenerRegister
{
private
final
SegmentParserListenerManager
listenerManager
;
public
SegmentParserListenerRegister
(
SegmentParserListenerManager
listenerManager
)
{
this
.
listenerManager
=
listenerManager
;
}
@Override
public
void
register
(
SpanListener
spanListener
)
{
this
.
listenerManager
.
add
(
spanListener
);
}
}
apm-collector/apm-collector-analysis/analysis-segment-parser/segment-parser-provider/src/main/resources/META-INF/services/org.apache.skywalking.apm.collector.core.module.ModuleProvider
0 → 100644
浏览文件 @
7c4c914a
#
# 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.
#
#
#
# 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.
#
#
org.apache.skywalking.apm.collector.analysis.segment.parser.provider.AnalysisTraceParseModuleProvider
\ No newline at end of file
apm-collector/apm-collector-analysis/pom.xml
浏览文件 @
7c4c914a
...
...
@@ -28,6 +28,16 @@
<modelVersion>
4.0.0
</modelVersion>
<artifactId>
apm-collector-analysis
</artifactId>
<packaging>
pom
</packaging>
<modules>
<module>
analysis-segment-parser
</module>
</modules>
<dependencies>
<dependency>
<groupId>
org.apache.skywalking
</groupId>
<artifactId>
apm-collector-core
</artifactId>
<version>
${project.version}
</version>
</dependency>
</dependencies>
</project>
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录