Skip to content

Conversation

@carlfranz
Copy link

@carlfranz carlfranz commented May 5, 2022

Add an agent plugin to support

  • If this pull request closes/resolves/fixes an existing issue, replace the issue number. Closes #.
  • Update the CHANGES log.

@wu-sheng
Copy link
Member

wu-sheng commented May 5, 2022

Please make sure you finish the test scenarios, which are mentioned by the plugin develop doc.

@carlfranz
Copy link
Author

Please make sure you finish the test scenarios, which are mentioned by the plugin develop doc.

We are working on that.

@wu-sheng
Copy link
Member

wu-sheng commented May 9, 2022

When you are ready, please add your case into GHA control file.

About docs, you need to update

  1. changes.md in the root
  2. supported-list to add new version.

@carlfranz carlfranz marked this pull request as ready for review May 12, 2022 13:00
@wu-sheng
Copy link
Member

When you are ready, please add your case into GHA control file.

This is still missing. We only could use GitHub action to test your scenario after you add it.

@wu-sheng
Copy link
Member

One question, what are the differences between 3.x and 4.x plugins? I noticed they are very similar.

@wu-sheng
Copy link
Member

One question, what are the differences between 3.x and 4.x plugins? I noticed they are very similar.

Could you example this first?

@carlfranz
Copy link
Author

carlfranz commented May 12, 2022

One question, what are the differences between 3.x and 4.x plugins? I noticed they are very similar.

Could you example this first?

It is a different artifact name from 3.x and 4.x. In the first one is resteasy-jaxrs and in the latter is resteasy-core.

@wu-sheng
Copy link
Member

It is a different artifact name from 3.x and 4.x. In the first one is resteasy-jaxrs and in the latter is resteasy-core.

I think the jar names don't matter when do instrumentation. The class's signature(class name, package name, method name and parameters with types) matters. Have you faced exceptions or something when you put 3.x plugin in 4.x runtime?

@carlfranz
Copy link
Author

It is a different artifact name from 3.x and 4.x. In the first one is resteasy-jaxrs and in the latter is resteasy-core.

I think the jar names don't matter when do instrumentation. The class's signature(class name, package name, method name and parameters with types) matters. Have you faced exceptions or something when you put 3.x plugin in 4.x runtime?

Using the 3.x plugin with a resteasy 4.x application throws a ClassNotFoundException.

@wu-sheng
Copy link
Member

I see, could you post the error here?

@carlfranz
Copy link
Author

java.lang.NoSuchMethodError: 'org.jboss.resteasy.spi.ResteasyUriInfo org.jboss.resteasy.spi.HttpRequest.getUri()'
	at org.apache.skywalking.apm.plugin.resteasy.v3.server.SynchronousDispatcherInterceptor.beforeMethod(SynchronousDispatcherInterceptor.java:50)
	at org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.InstMethodsInter.intercept(InstMethodsInter.java:76)
	at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java)
	at org.jboss.resteasy.core.SynchronousDispatcher.lambda$invoke$4(SynchronousDispatcher.java:261)
	at org.jboss.resteasy.core.SynchronousDispatcher.lambda$preprocess$0(SynchronousDispatcher.java:161)
	at org.jboss.resteasy.core.interception.jaxrs.PreMatchContainerRequestContext.filter(PreMatchContainerRequestContext.java:364)
	at org.jboss.resteasy.core.SynchronousDispatcher.preprocess(SynchronousDispatcher.java:164)
	at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:247)
	at io.quarkus.resteasy.runtime.standalone.RequestDispatcher.service(RequestDispatcher.java:73)
	at io.quarkus.resteasy.runtime.standalone.VertxRequestHandler.dispatch(VertxRequestHandler.java:151)
	at io.quarkus.resteasy.runtime.standalone.VertxRequestHandler$1.run(VertxRequestHandler.java:91)
	at io.quarkus.vertx.core.runtime.VertxCoreRecorder$13.runWith(VertxCoreRecorder.java:545)
	at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2449)
	at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1478)
	at org.jboss.threads.DelegatingRunnable.run(DelegatingRunnable.java:29)
	at org.jboss.threads.ThreadLocalResettingRunnable.run(ThreadLocalResettingRunnable.java:29)
	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
	at java.base/java.lang.Thread.run(Thread.java:833)```

@wu-sheng
Copy link
Member

There is code style in the root, please make sure your plugins and test codes could pass verfication.

@wu-sheng
Copy link
Member

Your new case is not working, please check this locally

https://github.com/apache/skywalking-java/runs/6415702839?check_suite_focus=true

# limitations under the License.
segmentItems:
- serviceName: resteasy-4.x-scenario
segmentSize: ge 10
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why ge 10? I can't see you wrote 10+ expected segments.

@wu-sheng
Copy link
Member

I think you didn't test this case locally, please make sure you have passed cases locally first.

@wu-sheng wu-sheng added the stale label May 30, 2022
@wu-sheng
Copy link
Member

@carlfranz Do you still work on this? It is no update for weeks.

@carlfranz
Copy link
Author

Hello @wu-sheng we are facing issues on the build. We cannot replicate locally the error we have with the GH pipeline. I'm not sure to find time to work on this anymore. It's frustrating because we were one step away to do it.

@wu-sheng
Copy link
Member

expected:	Span[-1, 0] HEAD:/resteasy-4.x-scenario/healthCheck
actual:	span[-1, 0] /update/1
reason:	[operation name]: expected=>{HEAD:/resteasy-4.x-scenario/healthCheck}, actual=>{/update/1}

From the CI loga, actually, your expected data file added resteasy-4.x-scenario, but you can see the actual data without this prefix.

Have you run the tests locally?

@carlfranz
Copy link
Author

We can't replicate the error locally. I think the issue is in the expected data file. I admit it is copied from spring scenario, I can't figure out how it works.

@wu-sheng
Copy link
Member

wu-sheng commented Jun 1, 2022

Please follow the plugin test doc

https://skywalking.apache.org/docs/skywalking-java/latest/en/setup/service-agent/java-agent/plugin-test/

You should be able to run it on any Linux and Intel based MacOS.

@Superskyyy Superskyyy changed the title adds support for reasteasy4 Add support for RESTEasy4 Jun 8, 2022
@wu-sheng
Copy link
Member

No update in two weeks. If you still want to continue on this, please let us know. All these tests could run and check on Linux locally, don't have to be on GitHub CI

@wu-sheng wu-sheng closed this Jun 17, 2022
@wu-sheng wu-sheng added this to the 8.11.0 milestone Jun 17, 2022
@wu-sheng wu-sheng mentioned this pull request Jun 29, 2022
5 tasks
wu-sheng pushed a commit that referenced this pull request Jun 29, 2022
- Most of the codes are copied from RESTEasy 3.x 
- The plugin test cases are copied from #169, which have been approved by its original author @carlfranz (https://github.com/carlfranz) through #265 (comment)
- Plugin codes are polished to adopt RESTEasy new APIs
- Test cases passed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants