-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
35 changed files
with
3,539 additions
and
8 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
zipkin-server/server-core/src/main/java/zipkin/server/core/ZipkinDispatcherManager.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 @@ | ||
/* | ||
* Copyright 2015-2023 The OpenZipkin Authors | ||
* | ||
* Licensed 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 zipkin.server.core; | ||
|
||
import org.apache.skywalking.oap.server.core.analysis.DispatcherManager; | ||
import org.apache.skywalking.oap.server.core.analysis.manual.searchtag.TagAutocompleteDispatcher; | ||
|
||
public class ZipkinDispatcherManager extends DispatcherManager { | ||
|
||
@Override | ||
public void addIfAsSourceDispatcher(Class aClass) throws IllegalAccessException, InstantiationException { | ||
if (aClass.getSimpleName().startsWith("Zipkin") || aClass.equals(TagAutocompleteDispatcher.class)) { | ||
super.addIfAsSourceDispatcher(aClass); | ||
} | ||
} | ||
} |
43 changes: 43 additions & 0 deletions
43
zipkin-server/server-core/src/main/java/zipkin/server/core/ZipkinSourceReceiverImpl.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,43 @@ | ||
/* | ||
* Copyright 2015-2023 The OpenZipkin Authors | ||
* | ||
* Licensed 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 zipkin.server.core; | ||
|
||
import org.apache.skywalking.oap.server.core.analysis.DispatcherDetectorListener; | ||
import org.apache.skywalking.oap.server.core.source.ISource; | ||
import org.apache.skywalking.oap.server.core.source.SourceReceiver; | ||
|
||
import java.io.IOException; | ||
|
||
public class ZipkinSourceReceiverImpl implements SourceReceiver { | ||
private final ZipkinDispatcherManager mgr; | ||
|
||
public ZipkinSourceReceiverImpl() { | ||
mgr = new ZipkinDispatcherManager(); | ||
} | ||
|
||
@Override | ||
public void receive(ISource source) { | ||
mgr.forward(source); | ||
} | ||
|
||
@Override | ||
public DispatcherDetectorListener getDispatcherDetectorListener() { | ||
return mgr; | ||
} | ||
|
||
public void scan() throws IOException, IllegalAccessException, InstantiationException { | ||
mgr.scan(); | ||
} | ||
} |
35 changes: 35 additions & 0 deletions
35
...n-server/server-core/src/main/java/zipkin/server/core/ZipkinStreamAnnotationListener.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,35 @@ | ||
/* | ||
* Copyright 2015-2023 The OpenZipkin Authors | ||
* | ||
* Licensed 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 zipkin.server.core; | ||
|
||
import org.apache.skywalking.oap.server.core.analysis.StreamAnnotationListener; | ||
import org.apache.skywalking.oap.server.core.analysis.manual.searchtag.TagAutocompleteData; | ||
import org.apache.skywalking.oap.server.core.storage.StorageException; | ||
import org.apache.skywalking.oap.server.library.module.ModuleDefineHolder; | ||
|
||
public class ZipkinStreamAnnotationListener extends StreamAnnotationListener { | ||
|
||
public ZipkinStreamAnnotationListener(ModuleDefineHolder moduleDefineHolder) { | ||
super(moduleDefineHolder); | ||
} | ||
|
||
@Override | ||
public void notify(Class aClass) throws StorageException { | ||
// only including all zipkin streaming | ||
if (aClass.getSimpleName().startsWith("Zipkin") || aClass.equals(TagAutocompleteData.class)) { | ||
super.notify(aClass); | ||
} | ||
} | ||
} |
44 changes: 44 additions & 0 deletions
44
zipkin-server/server-core/src/main/java/zipkin/server/core/services/SelfSenderService.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,44 @@ | ||
/* | ||
* Copyright 2015-2023 The OpenZipkin Authors | ||
* | ||
* Licensed 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 zipkin.server.core.services; | ||
|
||
import org.apache.skywalking.oap.server.core.remote.RemoteSenderService; | ||
import org.apache.skywalking.oap.server.core.remote.client.Address; | ||
import org.apache.skywalking.oap.server.core.remote.client.SelfRemoteClient; | ||
import org.apache.skywalking.oap.server.core.remote.data.StreamData; | ||
import org.apache.skywalking.oap.server.core.remote.selector.Selector; | ||
import org.apache.skywalking.oap.server.library.module.ModuleManager; | ||
|
||
public class SelfSenderService extends RemoteSenderService { | ||
private final ModuleManager moduleManager; | ||
private SelfRemoteClient self; | ||
|
||
public SelfSenderService(ModuleManager moduleManager) { | ||
super(moduleManager); | ||
this.moduleManager = moduleManager; | ||
} | ||
|
||
private SelfRemoteClient getSelf() { | ||
if (self == null) { | ||
self = new SelfRemoteClient(moduleManager, new Address("127.0.0.1", 0, true)); | ||
} | ||
return self; | ||
} | ||
|
||
@Override | ||
public void send(String nextWorkName, StreamData streamData, Selector selector) { | ||
getSelf().push(nextWorkName, streamData); | ||
} | ||
} |
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
Oops, something went wrong.