Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add resin plugin #187

Merged
merged 6 commits into from
May 10, 2017
Merged

add resin plugin #187

merged 6 commits into from
May 10, 2017

Conversation

bai-yang
Copy link
Member

add resin plugin #184

@coveralls
Copy link

Coverage Status

Coverage increased (+0.01%) to 71.293% when pulling a8aa4de on bai-yang:master into e6ea5e1 on wu-sheng:master.

Copy link
Member

@wu-sheng wu-sheng left a comment

Choose a reason for hiding this comment

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

My only concern is just the package name. Beyond that, I prefer you can provide a more complex demo, maybe like this:

HttpClient  --->  Resin ---> MySQL.

I have invent you to join @sky-walking. After confirmed, you can create a repo for demo.

Later, we maybe set a mechanism to check agent by these demo automatically.

@@ -0,0 +1,65 @@
package org.skywalking.apm.plugin.resin.v3x.v4x;
Copy link
Member

Choose a reason for hiding this comment

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

The package name didn't fit the Java Package Tradition. In Java, *.v3x.v4x means 3 is major version and 4 is minor version. But, according from my understanding, 3 and 4 are all major versions.

So I prefer the package name is org.skywalking.apm.plugin.resin34x. TomcatInterceptor class under package org.skywalking.apm.plugin.tomcat78x is for your reference.

@bai-yang
Copy link
Member Author

bai-yang commented May 1, 2017

@wu-sheng , I've changed package name.
I provide a more complex demo like this:
5
6

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.08%) to 71.204% when pulling ca7f02c on bai-yang:master into e6ea5e1 on wu-sheng:master.

@wu-sheng
Copy link
Member

wu-sheng commented May 1, 2017

Why the coverage decrease?

Copy link
Member

@wu-sheng wu-sheng left a comment

Choose a reason for hiding this comment

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

LGTM, cc @ascrutae Thoughts?

@wu-sheng wu-sheng added this to the 3.1-2017 milestone May 1, 2017
}

@Override
public Object afterMethod(EnhancedClassInstanceContext context, InstanceMethodInvokeContext interceptorContext,
Copy link
Member

@ascrutae ascrutae May 1, 2017

Choose a reason for hiding this comment

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

Current span need to record status code. and also check the status code, Please see Tomcat plugin

HttpServletRequest request = (HttpServletRequest)args[0];
Span span = ContextManager.createSpan(request.getRequestURI());
Tags.COMPONENT.set(span, RESIN_COMPONENT);
Tags.PEER_HOST.set(span, request.getServerName());
Copy link
Member

Choose a reason for hiding this comment

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

Request#getServerName() cannot get the correct client host if Resin is behind a reverse proxy or load balancer. You may need to use HttpServletRequest.getHeader("x-forwarded-proto") instead.

@wu-sheng wu-sheng removed this from the 3.1-2017 milestone May 2, 2017
@wu-sheng
Copy link
Member

wu-sheng commented May 2, 2017

I hava just removed the milestone (3.1). After we agree to merge, I will set that again.

@wu-sheng
Copy link
Member

wu-sheng commented May 9, 2017

@bai-yang , #193 has been merged, please retry your pr.

@bai-yang
Copy link
Member Author

bai-yang commented May 9, 2017

@wu-sheng , resin-3.x.x and resin-4.x.x are available
Test demo like this:
1a
2a
3a

Copy link
Member

@wu-sheng wu-sheng left a comment

Choose a reason for hiding this comment

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

#191 provides a new feature about disable plugin, So every plugin must provide a name in skywalking-plugin.def.

You can wait the #191 merged.

Copy link
Member

@wu-sheng wu-sheng left a comment

Choose a reason for hiding this comment

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

LGTM, cc @ascrutae

@wu-sheng
Copy link
Member

@sky-walking, @sky-walking/contributors, Can we merge this now?

Copy link
Member

@ascrutae ascrutae left a comment

Choose a reason for hiding this comment

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

LGTM

@wu-sheng wu-sheng merged commit 1c4905e into apache:master May 10, 2017
lu-xiaoshuang pushed a commit to lu-xiaoshuang/skywalking that referenced this pull request Aug 12, 2024
* Remove JDK 14 from tests

* Remove jdk14-with-gson test.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants