Support Hessian 4.0.x.#2644
Conversation
|
You need to submit test case to here https://github.com/SkyAPMTest/agent-auto-integration-testcases You could find the document there too. |
|
|
Coverage decreased (-0.0008%) to 16.423% when pulling b9665682c3a2df8b2897fae1198a87eb17f1f53d on wayilau:feature2 into 118485f on apache:master. |
|
Coverage increased (+0.2%) to 17.1% when pulling fcf7b3716fed898c6c6bfebb8e2418a3baaab1b5 on wayilau:feature2 into 4f89ea2 on apache:master. |
There was a problem hiding this comment.
The ExitSpan isn't been created all the time, but stopspan is always.
Here maybe some logical problems
There was a problem hiding this comment.
ok,thanks for your review. i will check.
|
Please resolve the conflict, the shardingsphere plugin just got merged. |
|
Be advised, RESTEasy plugin merged, conflict needs to be solved. |
|
Also, as an RPC framework, Hessian logo is required in UI. Take apache/skywalking-rocketbot-ui#113 as an example. |
I will add this after i finished the tests. |
|
@wu-sheng I have add an Instrumentation, but it doesn't works for me, also I can not debug into the Instrmentation when the agent start. so I could not get expected data when i was taking the skyapm tests. do I make some config mistakes ? |
|
I don't know, the codes look like normal. Does other plugin work? Agent could be tested, read blog, http://skywalking.apache.org/zh/blog/2019-01-24-skywalking-remote-debug.html (CN) and learn remote debug. |
|
There is no special case for instrumentation. |
|
@wu-sheng why this builds fails, it tells me that other pkg's class is not allowed. |
Yes, importing third parties' class will break the agent when there is no such class in the target application, see #2871 and #2908 , and never try to use full qualified class names to work around the failure, use string literature if needed |
|
FAILURE |
|
Refer to this link for build results (access rights to CI server needed): |
|
@kezhenxu94 Thanks for many useful suggestions. I have fixed this. |
kezhenxu94
left a comment
There was a problem hiding this comment.
Hi @wayilau , I noticed that you are instrumenting class org.springframework.remoting.caucho.HessianServiceExporter, which is not part of hessian core, and we cannot assume that the users use hessian with Spring framework always; actually hessian can be used in plain Java application like what I did based on your agent test code:
- add Jetty dependency:
<dependency>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty</artifactId>
<version>6.1.26</version>
</dependency>-
make your
HelloServiceImpl extends HessianServlet: -
modify the
mainmethod of theHessianServer:
@SpringBootApplication
public class HessianServer
{
@Autowired
private HelloService helloService = new HelloServiceImpl();
public static void main( String[] args ) throws Exception {
final Server server = new Server(9099);
final Context context = new Context(server, "/", Context.SESSIONS);
context.addServlet(HelloServiceImpl.class, "/HelloService");
server.start();
}
@Bean(name="/HelloService")
public HessianServiceExporter getExporter() {
HessianServiceExporter exporter = new HessianServiceExporter();
exporter.setServiceInterface(HelloService.class);
exporter.setService(helloService);
return exporter;
}
}we don't need all the annotations from Spring, but I'm lazy to remove :)
- run the server as well as client
And the traces would break like this:
I have no experience with this case and I'm not sure whether this is acceptable, @wu-sheng WDYT
|
I am not a hession user, too. But Basically, I think @kezhenxu94 get the point, it should work w/ and w/o Spring both like other plugins did. |
@wu-sheng @kezhenxu94 |
I shoud add an instrumentation for HessianServlet ? am i right ? @kezhenxu94 |
Spring doesn't use To summarize, I think class |
Yes, you are right. I will have a try to get the url from the HessianSkeleton and remove the spring's instrumentation. |
|
@kezhenxu94 @wu-sheng |
This is server side instrumentation, right? Why send from client side? That header should not be added. |
Yes, HessianSkeleton is an instrumentation. in HessianSkeleton it only read or write data from stream. |
Are you saying the data in HessianSkeleton is only binary and not encoded yet? If so, don't instrument there. |
|
|
||
| <dependency> | ||
| <groupId>org.projectlombok</groupId> | ||
| <artifactId>lombok</artifactId> |
There was a problem hiding this comment.
Lomhok has been added at root.
|
@kezhenxu94 Do you have any time to review this pr ? i have removed the spring's instrumentation. |
@wayilau Did you test what I mentioned in #2644 (review) ? Seems that the trace still breaks, what's worse, the topology becomes uninterpretable |
sorry, i didn't do that, i will test this follow your code. |
|
I close this first. i will reopen when i finish this. |



Please answer these questions before submitting pull request
Plugin Support hessian 4.0.x.