From e7ce4d757c93847579d6d212a13383f4b70e0d2e Mon Sep 17 00:00:00 2001 From: Wu Sheng Date: Tue, 24 Jul 2018 16:12:24 +0800 Subject: [PATCH] Add service mesh receiver. --- oap-server/server-receiver-plugin/pom.xml | 3 +- .../mesh-receiver-module/pom.xml | 33 +++++++++++ .../mesh/module/MeshReceiverModule.java | 33 +++++++++++ ...ing.oap.server.library.module.ModuleDefine | 20 +++++++ .../mesh-receiver-provider/pom.xml | 40 ++++++++++++++ .../mesh/provider/MeshReceiverProvider.java | 55 +++++++++++++++++++ ...g.oap.server.library.module.ModuleProvider | 20 +++++++ .../skywalking-mesh-receiver-plugin/pom.xml | 37 +++++++++++++ .../pom.xml | 2 +- oap-server/server-starter/pom.xml | 2 +- .../src/main/resources/application.yml | 2 + 11 files changed, 244 insertions(+), 3 deletions(-) create mode 100644 oap-server/server-receiver-plugin/skywalking-mesh-receiver-plugin/mesh-receiver-module/pom.xml create mode 100644 oap-server/server-receiver-plugin/skywalking-mesh-receiver-plugin/mesh-receiver-module/src/main/java/org/apache/skywalking/aop/server/receiver/mesh/module/MeshReceiverModule.java create mode 100644 oap-server/server-receiver-plugin/skywalking-mesh-receiver-plugin/mesh-receiver-module/src/main/resources/META-INF/services/org.apache.skywalking.oap.server.library.module.ModuleDefine create mode 100644 oap-server/server-receiver-plugin/skywalking-mesh-receiver-plugin/mesh-receiver-provider/pom.xml create mode 100644 oap-server/server-receiver-plugin/skywalking-mesh-receiver-plugin/mesh-receiver-provider/src/main/java/org/apache/skywalking/aop/server/receiver/mesh/provider/MeshReceiverProvider.java create mode 100644 oap-server/server-receiver-plugin/skywalking-mesh-receiver-plugin/mesh-receiver-provider/src/main/resources/META-INF/services/org.apache.skywalking.oap.server.library.module.ModuleProvider create mode 100644 oap-server/server-receiver-plugin/skywalking-mesh-receiver-plugin/pom.xml rename oap-server/server-receiver-plugin/{skywalking-receiver-plugin => skywalking-trace-receiver-plugin}/pom.xml (94%) diff --git a/oap-server/server-receiver-plugin/pom.xml b/oap-server/server-receiver-plugin/pom.xml index 9de85a49c..16320ef6d 100644 --- a/oap-server/server-receiver-plugin/pom.xml +++ b/oap-server/server-receiver-plugin/pom.xml @@ -30,8 +30,9 @@ server-receiver-plugin pom - skywalking-receiver-plugin + skywalking-trace-receiver-plugin zipkin-receiver-plugin + skywalking-mesh-receiver-plugin diff --git a/oap-server/server-receiver-plugin/skywalking-mesh-receiver-plugin/mesh-receiver-module/pom.xml b/oap-server/server-receiver-plugin/skywalking-mesh-receiver-plugin/mesh-receiver-module/pom.xml new file mode 100644 index 000000000..874e25c2e --- /dev/null +++ b/oap-server/server-receiver-plugin/skywalking-mesh-receiver-plugin/mesh-receiver-module/pom.xml @@ -0,0 +1,33 @@ + + + + + + skywalking-mesh-receiver-plugin + org.apache.skywalking + 6.0.0-alpha-SNAPSHOT + + 4.0.0 + + mesh-receiver-module + + + \ No newline at end of file diff --git a/oap-server/server-receiver-plugin/skywalking-mesh-receiver-plugin/mesh-receiver-module/src/main/java/org/apache/skywalking/aop/server/receiver/mesh/module/MeshReceiverModule.java b/oap-server/server-receiver-plugin/skywalking-mesh-receiver-plugin/mesh-receiver-module/src/main/java/org/apache/skywalking/aop/server/receiver/mesh/module/MeshReceiverModule.java new file mode 100644 index 000000000..23e50cd55 --- /dev/null +++ b/oap-server/server-receiver-plugin/skywalking-mesh-receiver-plugin/mesh-receiver-module/src/main/java/org/apache/skywalking/aop/server/receiver/mesh/module/MeshReceiverModule.java @@ -0,0 +1,33 @@ +/* + * 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.aop.server.receiver.mesh.module; + +import org.apache.skywalking.oap.server.library.module.ModuleDefine; + +public class MeshReceiverModule extends ModuleDefine { + public static final String NAME = "service-mesh"; + + @Override public String name() { + return NAME; + } + + @Override public Class[] services() { + return new Class[0]; + } +} diff --git a/oap-server/server-receiver-plugin/skywalking-mesh-receiver-plugin/mesh-receiver-module/src/main/resources/META-INF/services/org.apache.skywalking.oap.server.library.module.ModuleDefine b/oap-server/server-receiver-plugin/skywalking-mesh-receiver-plugin/mesh-receiver-module/src/main/resources/META-INF/services/org.apache.skywalking.oap.server.library.module.ModuleDefine new file mode 100644 index 000000000..017617b51 --- /dev/null +++ b/oap-server/server-receiver-plugin/skywalking-mesh-receiver-plugin/mesh-receiver-module/src/main/resources/META-INF/services/org.apache.skywalking.oap.server.library.module.ModuleDefine @@ -0,0 +1,20 @@ +# +# 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.aop.server.receiver.mesh.module.MeshReceiverModule \ No newline at end of file diff --git a/oap-server/server-receiver-plugin/skywalking-mesh-receiver-plugin/mesh-receiver-provider/pom.xml b/oap-server/server-receiver-plugin/skywalking-mesh-receiver-plugin/mesh-receiver-provider/pom.xml new file mode 100644 index 000000000..185b2273d --- /dev/null +++ b/oap-server/server-receiver-plugin/skywalking-mesh-receiver-plugin/mesh-receiver-provider/pom.xml @@ -0,0 +1,40 @@ + + + + + + skywalking-mesh-receiver-plugin + org.apache.skywalking + 6.0.0-alpha-SNAPSHOT + + 4.0.0 + + mesh-receiver-provider + + + org.apache.skywalking + mesh-receiver-module + ${project.version} + + + + + \ No newline at end of file diff --git a/oap-server/server-receiver-plugin/skywalking-mesh-receiver-plugin/mesh-receiver-provider/src/main/java/org/apache/skywalking/aop/server/receiver/mesh/provider/MeshReceiverProvider.java b/oap-server/server-receiver-plugin/skywalking-mesh-receiver-plugin/mesh-receiver-provider/src/main/java/org/apache/skywalking/aop/server/receiver/mesh/provider/MeshReceiverProvider.java new file mode 100644 index 000000000..d4dcd3cbb --- /dev/null +++ b/oap-server/server-receiver-plugin/skywalking-mesh-receiver-plugin/mesh-receiver-provider/src/main/java/org/apache/skywalking/aop/server/receiver/mesh/provider/MeshReceiverProvider.java @@ -0,0 +1,55 @@ +/* + * 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.aop.server.receiver.mesh.provider; + +import org.apache.skywalking.aop.server.receiver.mesh.module.MeshReceiverModule; +import org.apache.skywalking.oap.server.library.module.ModuleConfig; +import org.apache.skywalking.oap.server.library.module.ModuleDefine; +import org.apache.skywalking.oap.server.library.module.ModuleProvider; +import org.apache.skywalking.oap.server.library.module.ModuleStartException; +import org.apache.skywalking.oap.server.library.module.ServiceNotProvidedException; + +public class MeshReceiverProvider extends ModuleProvider { + @Override public String name() { + return "default"; + } + + @Override public Class module() { + return MeshReceiverModule.class; + } + + @Override public ModuleConfig createConfigBeanIfAbsent() { + return null; + } + + @Override public void prepare() throws ServiceNotProvidedException, ModuleStartException { + + } + + @Override public void start() throws ServiceNotProvidedException, ModuleStartException { + } + + @Override public void notifyAfterCompleted() throws ServiceNotProvidedException, ModuleStartException { + + } + + @Override public String[] requiredModules() { + return new String[0]; + } +} diff --git a/oap-server/server-receiver-plugin/skywalking-mesh-receiver-plugin/mesh-receiver-provider/src/main/resources/META-INF/services/org.apache.skywalking.oap.server.library.module.ModuleProvider b/oap-server/server-receiver-plugin/skywalking-mesh-receiver-plugin/mesh-receiver-provider/src/main/resources/META-INF/services/org.apache.skywalking.oap.server.library.module.ModuleProvider new file mode 100644 index 000000000..d80490517 --- /dev/null +++ b/oap-server/server-receiver-plugin/skywalking-mesh-receiver-plugin/mesh-receiver-provider/src/main/resources/META-INF/services/org.apache.skywalking.oap.server.library.module.ModuleProvider @@ -0,0 +1,20 @@ +# +# 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.aop.server.receiver.mesh.provider.MeshReceiverProvider \ No newline at end of file diff --git a/oap-server/server-receiver-plugin/skywalking-mesh-receiver-plugin/pom.xml b/oap-server/server-receiver-plugin/skywalking-mesh-receiver-plugin/pom.xml new file mode 100644 index 000000000..c8ec9e3d6 --- /dev/null +++ b/oap-server/server-receiver-plugin/skywalking-mesh-receiver-plugin/pom.xml @@ -0,0 +1,37 @@ + + + + + + server-receiver-plugin + org.apache.skywalking + 6.0.0-alpha-SNAPSHOT + + 4.0.0 + + skywalking-mesh-receiver-plugin + pom + + mesh-receiver-module + mesh-receiver-provider + + + \ No newline at end of file diff --git a/oap-server/server-receiver-plugin/skywalking-receiver-plugin/pom.xml b/oap-server/server-receiver-plugin/skywalking-trace-receiver-plugin/pom.xml similarity index 94% rename from oap-server/server-receiver-plugin/skywalking-receiver-plugin/pom.xml rename to oap-server/server-receiver-plugin/skywalking-trace-receiver-plugin/pom.xml index 61066ca1d..c32295abd 100644 --- a/oap-server/server-receiver-plugin/skywalking-receiver-plugin/pom.xml +++ b/oap-server/server-receiver-plugin/skywalking-trace-receiver-plugin/pom.xml @@ -27,6 +27,6 @@ 4.0.0 - skywalking-receiver-plugin + skywalking-trace-receiver-plugin jar \ No newline at end of file diff --git a/oap-server/server-starter/pom.xml b/oap-server/server-starter/pom.xml index d3aacb3db..6f4335b64 100644 --- a/oap-server/server-starter/pom.xml +++ b/oap-server/server-starter/pom.xml @@ -56,7 +56,7 @@ org.apache.skywalking - skywalking-receiver-plugin + mesh-receiver-provider ${project.version} diff --git a/oap-server/server-starter/src/main/resources/application.yml b/oap-server/server-starter/src/main/resources/application.yml index 1faf0e2d8..fac741505 100644 --- a/oap-server/server-starter/src/main/resources/application.yml +++ b/oap-server/server-starter/src/main/resources/application.yml @@ -30,3 +30,5 @@ core: gRPCPort: 11800 storage: elasticsearch: +service-mesh: + default: