hprose / hprose-java

Hprose is a cross-language RPC. This project is Hprose 2.0 for Java
MIT License
550 stars 187 forks source link

SkyWalking HProse plugin for auto instrument #36

Open wu-sheng opened 6 years ago

wu-sheng commented 6 years ago

Since SkyWalking became an Apache project, we are going to build a more wildly support ecosystem. So I want to know:

andot commented 6 years ago

Does the HProse team want to provide the plugins for hprose-java released version?

Yes.

which versions do you prefer to support?

2.0.30+

wu-sheng commented 6 years ago

Sure. Hope to see your pull request soon. Cheer. Now, we have documents about plugins and plugin test cases. Glad you can join us.

andot commented 6 years ago

What should I do? Does this project https://github.com/opentracing-contrib/java-hprose support SkyWalking?

wu-sheng commented 6 years ago

I hope can provide auto instrument in SkyWalking, also means native supported, not just by OT supported.. You can find many rpc frameworks already supported. You can find plugin development guide in our document.

wu-sheng commented 6 years ago

The OT API changes from time to time. I don't think it is the best way to do so.

andot commented 6 years ago

Can you give me an example?

wu-sheng commented 6 years ago

https://github.com/apache/incubator-skywalking/tree/master/apm-sniffer/apm-sdk-plugin

You can find all of our plugins source files. I suggest you take motan or dubbo as an example.

wu-sheng commented 6 years ago

And you can find our test cases here, https://github.com/SkywalkingTest/skywalking-agent-testcases

wu-sheng commented 6 years ago

Test cases guide, https://github.com/SkywalkingTest/skywalking-agent-testcases/blob/master/docs/how-to-write-a-plugin-testcase-cn.md

wu-sheng commented 6 years ago

Plugin development guide, https://github.com/apache/incubator-skywalking/blob/master/docs/cn/Plugin-Development-Guide-CN.md

andot commented 6 years ago

看了好久,发现完全看不懂。

wu-sheng commented 6 years ago

哪些地方看不懂?原理其实和Spring AOP类似,只是更强而已。

可以针对构造函数和方法,增加切面。然后利用我们ContextManager的APIs,要创建span或者传输carrier。这部分和OpenTracing很类似的。

andot commented 6 years ago

OpenTracing 这个比较好懂,可以直接作为 hprose 的一个中间件来实现。但是 SkyWalking 的插件,没看懂该在哪儿增加切面。

wu-sheng commented 6 years ago

hprose的任何方法都可以,他有点像spring切面。可以加载到任何包里面的类上面。

andot commented 6 years ago

是指在发布的服务类上面增加切面吗?如果是在发布的服务类上面的话,好像就不用专门为hprose来写了,那应该就是通用的了啊。