Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Restore Zipkin receiver based on new core (#1932)
* Change some codes to make zipkin receiver works, not done yet. * @adriancole Zipkin receiver is coming back again. * Fix document and fix for Zipkin receiver. * Fix some bugs. * Fix register bug. * Fix transfer bug for new backend core.
- Loading branch information
1 parent
afd6164
commit 6b35113
Showing
33 changed files
with
1,821 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
...e/skywalking/oap/server/receiver/trace/provider/parser/ISegmentParserListenerManager.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/* | ||
* 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.oap.server.receiver.trace.provider.parser; | ||
|
||
import org.apache.skywalking.oap.server.receiver.trace.provider.parser.listener.SpanListenerFactory; | ||
|
||
/** | ||
* @author wusheng | ||
*/ | ||
public interface ISegmentParserListenerManager { | ||
void add(SpanListenerFactory spanListenerFactory); | ||
} |
29 changes: 29 additions & 0 deletions
29
...rg/apache/skywalking/oap/server/receiver/trace/provider/parser/ISegmentParserService.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/* | ||
* 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.oap.server.receiver.trace.provider.parser; | ||
|
||
import org.apache.skywalking.apm.network.language.agent.UpstreamSegment; | ||
import org.apache.skywalking.oap.server.library.module.Service; | ||
|
||
/** | ||
* @author wusheng | ||
*/ | ||
public interface ISegmentParserService extends Service { | ||
void send(UpstreamSegment segment); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
...apache/skywalking/oap/server/receiver/trace/provider/parser/SegmentParserServiceImpl.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/* | ||
* 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.oap.server.receiver.trace.provider.parser; | ||
|
||
import org.apache.skywalking.apm.network.language.agent.UpstreamSegment; | ||
|
||
/** | ||
* @author wusheng | ||
*/ | ||
public class SegmentParserServiceImpl implements ISegmentParserService { | ||
private final SegmentParse.Producer segmentProducer; | ||
|
||
public SegmentParserServiceImpl( | ||
SegmentParse.Producer segmentProducer) { | ||
this.segmentProducer = segmentProducer; | ||
} | ||
|
||
@Override | ||
public void send(UpstreamSegment segment) { | ||
segmentProducer.send(segment, SegmentParse.Source.Agent); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
48 changes: 48 additions & 0 deletions
48
...in/src/main/java/org/apache/skywalking/oap/server/receiver/zipkin/CoreRegisterLinker.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
/* | ||
* 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.oap.server.receiver.zipkin; | ||
|
||
import org.apache.skywalking.oap.server.core.CoreModule; | ||
import org.apache.skywalking.oap.server.core.register.service.IServiceInstanceInventoryRegister; | ||
import org.apache.skywalking.oap.server.core.register.service.IServiceInventoryRegister; | ||
import org.apache.skywalking.oap.server.library.module.ModuleManager; | ||
|
||
public class CoreRegisterLinker { | ||
private static volatile ModuleManager MODULE_MANAGER; | ||
private static volatile IServiceInventoryRegister SERVICE_INVENTORY_REGISTER; | ||
private static volatile IServiceInstanceInventoryRegister SERVICE_INSTANCE_INVENTORY_REGISTER; | ||
|
||
public static void setModuleManager(ModuleManager moduleManager) { | ||
CoreRegisterLinker.MODULE_MANAGER = moduleManager; | ||
} | ||
|
||
public static IServiceInventoryRegister getServiceInventoryRegister() { | ||
if (SERVICE_INVENTORY_REGISTER == null) { | ||
SERVICE_INVENTORY_REGISTER = MODULE_MANAGER.find(CoreModule.NAME).provider().getService(IServiceInventoryRegister.class); | ||
} | ||
return SERVICE_INVENTORY_REGISTER; | ||
} | ||
|
||
public static IServiceInstanceInventoryRegister getServiceInstanceInventoryRegister() { | ||
if (SERVICE_INSTANCE_INVENTORY_REGISTER == null) { | ||
SERVICE_INSTANCE_INVENTORY_REGISTER = MODULE_MANAGER.find(CoreModule.NAME).provider().getService(IServiceInstanceInventoryRegister.class); | ||
} | ||
return SERVICE_INSTANCE_INVENTORY_REGISTER; | ||
} | ||
} |
Oops, something went wrong.