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 webflux webclient plugin #5493

Merged
merged 40 commits into from Sep 27, 2020
Merged

add webflux webclient plugin #5493

merged 40 commits into from Sep 27, 2020

Conversation

vcjmhg
Copy link
Contributor

@vcjmhg vcjmhg commented Sep 15, 2020

Please answer these questions before submitting a pull request

  • Why submit this pull request?

  • Bug fix

  • New feature provided

  • Improve performance

  • Related issues


Bug fix

  • Bug description.

  • How to fix?


New feature or improvement

This plugin can collect the information of webflux

Interceptor Method

org.springframework.web.reactive.function.client.ExchangeFunctions$DefaultExchangeFunction$exchange()

Why I chose the mehod?

No matter what the webclient calls exchange() or retrieve(), the asynchronous request is finally executed through org.springframework.web.reactive.function.client.ExchangeFunctions$DefaultExchangeFunction$exchange() and return Mono<ClientResponse> .So I chose exchange() as the Interceptor Method.

Result

Screen Capture_select-area_20200910201523

@codecov
Copy link

codecov bot commented Sep 15, 2020

Codecov Report

Merging #5493 into master will increase coverage by 0.88%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #5493      +/-   ##
============================================
+ Coverage     51.29%   52.17%   +0.88%     
- Complexity     3301     3350      +49     
============================================
  Files          1604      897     -707     
  Lines         34051    22141   -11910     
  Branches       3706     2119    -1587     
============================================
- Hits          17466    11552    -5914     
+ Misses        15723     9660    -6063     
- Partials        862      929      +67     
Impacted Files Coverage Δ Complexity Δ
.../apm/network/trace/component/ComponentsDefine.java 98.75% <100.00%> (+0.01%) 1.00 <0.00> (ø)
...p/server/core/analysis/metrics/MinLongMetrics.java 0.00% <0.00%> (-100.00%) 0.00% <0.00%> (ø%)
...er/exporter/provider/grpc/GRPCExporterSetting.java 0.00% <0.00%> (-100.00%) 0.00% <0.00%> (ø%)
...king/oap/server/configuration/api/ConfigTable.java 0.00% <0.00%> (-100.00%) 0.00% <0.00%> (ø%)
...g/oap/server/cluster/plugin/etcd/EtcdEndpoint.java 0.00% <0.00%> (-100.00%) 0.00% <0.00%> (ø%)
...skywalking/oap/server/receiver/envoy/als/Role.java 0.00% <0.00%> (-100.00%) 0.00% <0.00%> (ø%)
.../server/receiver/envoy/als/DependencyResource.java 0.00% <0.00%> (-100.00%) 0.00% <0.00%> (ø%)
...erver/cluster/plugin/consul/ConsulCoordinator.java 0.00% <0.00%> (-97.06%) 0.00% <0.00%> (ø%)
...ent/core/context/status/ExceptionCheckContext.java 0.00% <0.00%> (-90.91%) 0.00% <0.00%> (ø%)
...t/status/HierarchyMatchExceptionCheckStrategy.java 9.09% <0.00%> (-90.91%) 1.00% <0.00%> (ø%)
... and 1107 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b560bae...2cd47d4. Read the comment docs.

@wu-sheng wu-sheng added agent Language agent related. feature New feature plugin Plugin for agent or collector. Be used to extend the capabilities of default implementor. labels Sep 15, 2020
@wu-sheng
Copy link
Member

Your test case seems to include the context propagation, but your screenshot seems to not include that important part.

@wu-sheng
Copy link
Member

Please read check-javaagent-plugin-list.sh, you seem missing a document update.

@vcjmhg
Copy link
Contributor Author

vcjmhg commented Sep 15, 2020

Your test case seems to include the context propagation, but your screenshot seems to not include that important part.

Dear sir,do you mean the expectedData.yaml is incorrect ?And it missed some important part,is it?

@wu-sheng
Copy link
Member

Dear sir,do you mean the expectedData.yaml is incorrect ?And it missed some important part,is it?

Your screenshot. Webflux doesn't call another service.

@wu-sheng
Copy link
Member

Also, webflux case fails, you need to recheck.

@vcjmhg
Copy link
Contributor Author

vcjmhg commented Sep 15, 2020

Also, webflux case fails, you need to recheck.

Thank you,sir. I will recheck it.

@wu-sheng
Copy link
Member

You don't need to keep update your branch. You could focus on your plugin and tests. We just need the sync before merging.

@vcjmhg
Copy link
Contributor Author

vcjmhg commented Sep 16, 2020

You don't need to keep update your branch. You could focus on your plugin and tests. We just need the sync before merging.

ok,I got it.And I will do what you said.

@vcjmhg
Copy link
Contributor Author

vcjmhg commented Sep 17, 2020

@wu-sheng ,Mr. Wu,when I test in my pc, the test case has passed. The result is just like this:
Screen Capture_select-area_20200916224020
But when test with CI, it always blocked .And the reason showed in log is that webflux-webclient-scenario.jar is not a file.
Screen Capture_select-area_20200917141901
I has update Plugin-list.md and submodule project.So I don't know why it failed when test with CI. Could you please give me some suggestions or point out some of the problems?

@wu-sheng
Copy link
Member

@dmsolr @kezhenxu94 Could you take a look?

Copy link
Member

@kezhenxu94 kezhenxu94 left a comment

Choose a reason for hiding this comment

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

The newly-added module is not packaged before webflux-dist module, so the error message occurred, see my comment inline, please also note that there is another failure in the CI

test/plugin/scenarios/webflux-scenario/pom.xml Outdated Show resolved Hide resolved
vcjmhg and others added 8 commits September 23, 2020 10:00
� Conflicts:
�	test/plugin/scenarios/webflux-scenario/support-version.list
�	test/plugin/scenarios/webflux-scenario/webflux-projectA-scenario/src/main/java/org/apache/skywalking/apm/testcase/sc/webflux/projectA/controller/TestController.java
Comment on lines 19 to 24
2.1.1.RELEASE
2.1.2.RELEASE
2.1.3.RELEASE
2.1.4.RELEASE
2.1.5.RELEASE
2.1.6.RELEASE
Copy link
Member

Choose a reason for hiding this comment

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

Recently, we are reducing the unnecessary tests, you could run all these locally, but in the upstream CI, we recommend the latest mini version num, 2.1.6 for all 2.1.x.

Copy link
Contributor Author

@vcjmhg vcjmhg Sep 26, 2020

Choose a reason for hiding this comment

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

Need I modify it ? Just like this:

2.1.6.RELEASE
2.1.7.RELEASE
2.1.8.RELEASE
2.1.9.RELEASE
2.1.10.RELEASE
2.1.11.RELEASE
2.1.12.RELEASE
2.1.13.RELEASE
2.1.14.RELEASE
2.1.15.RELEASE

Copy link
Member

Choose a reason for hiding this comment

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

I think just 2.1.15? Do they have big difference?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The differences between 2.1.x versions are mainly bug fixes. It seems that the difference will not affect our test results.But the version has released to 2.3.x and these versions will include new feature additions . So I don't whether we need to add test for different version of 2.x ?
The specific differences can be seen in the following link:https://github.com/spring-projects/spring-boot/tags

Copy link
Member

Choose a reason for hiding this comment

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

Basically, we recommend using the latest versions of 2.1.x, 2.2.x, and 2.3.x

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok,I got it . I wiil modify it immediately.

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.

Test codes look good to me, please add comments for all src codes. @kezhenxu94 Could you recheck?

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

@wu-sheng wu-sheng added this to the 8.2.0 milestone Sep 27, 2020
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.

The Webflux plugin seems still unstable. I saw it passed once, but when I re-run it, it has failed twice. Could you help on rechecking?

Comment on lines +19 to +21
2.1.17.RELEASE
2.2.10.RELEASE
2.3.4.RELEASE
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The version of 2.1x.RELEASE seems has passed ,but 2.2.x failed.It seem context-path has not activated,I will check it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The reason for the failure of the 2.2.10 and 2.3.4 is the change in webflux's dependency on netty after 2.2.x.And I have solved it and the test has passed in my pc.
image

@wu-sheng wu-sheng merged commit 806666b into apache:master Sep 27, 2020
@vcjmhg vcjmhg deleted the dev branch September 28, 2020 01:07
@vcjmhg vcjmhg restored the dev branch September 28, 2020 01:07
@vcjmhg vcjmhg deleted the dev branch July 26, 2021 11:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
agent Language agent related. feature New feature plugin Plugin for agent or collector. Be used to extend the capabilities of default implementor.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants