Feature: support endpoint name grouping by OpenAPI definitions.#7130
Merged
wu-sheng merged 21 commits intoapache:masterfrom Jun 19, 2021
Merged
Feature: support endpoint name grouping by OpenAPI definitions.#7130wu-sheng merged 21 commits intoapache:masterfrom
wu-sheng merged 21 commits intoapache:masterfrom
Conversation
Codecov Report
@@ Coverage Diff @@
## master #7130 +/- ##
============================================
+ Coverage 50.35% 53.01% +2.65%
- Complexity 2692 4263 +1571
============================================
Files 740 1876 +1136
Lines 18265 40707 +22442
Branches 1766 4534 +2768
============================================
+ Hits 9198 21579 +12381
- Misses 8337 18063 +9726
- Partials 730 1065 +335
Continue to review full report at Codecov.
|
.../library-util/src/main/java/org/apache/skywalking/oap/server/library/util/ResourceUtils.java
Outdated
Show resolved
Hide resolved
kezhenxu94
reviewed
Jun 18, 2021
...org/apache/skywalking/oap/server/core/config/group/openapi/EndpointGroupingRule4Openapi.java
Outdated
Show resolved
Hide resolved
...ache/skywalking/oap/server/core/config/group/openapi/EndpointGroupingRuleReader4Openapi.java
Outdated
Show resolved
Hide resolved
...e/src/main/java/org/apache/skywalking/oap/server/core/config/group/EndpointNameGrouping.java
Outdated
Show resolved
Hide resolved
...e/src/main/java/org/apache/skywalking/oap/server/core/config/group/EndpointNameGrouping.java
Outdated
Show resolved
Hide resolved
fix/polish some typo and codes Co-authored-by: kezhenxu94 <kezhenxu94@apache.org>
wu-sheng
reviewed
Jun 18, 2021
wu-sheng
reviewed
Jun 18, 2021
wu-sheng
reviewed
Jun 18, 2021
wu-sheng
reviewed
Jun 18, 2021
kezhenxu94
reviewed
Jun 18, 2021
kezhenxu94
reviewed
Jun 18, 2021
kezhenxu94
previously approved these changes
Jun 18, 2021
wu-sheng
reviewed
Jun 18, 2021
wu-sheng
reviewed
Jun 18, 2021
.../library-util/src/main/java/org/apache/skywalking/oap/server/library/util/ResourceUtils.java
Outdated
Show resolved
Hide resolved
…ead the max depth 1 of the directory
wu-sheng
reviewed
Jun 19, 2021
wu-sheng
reviewed
Jun 19, 2021
wu-sheng
reviewed
Jun 19, 2021
wu-sheng
reviewed
Jun 19, 2021
...ache/skywalking/oap/server/core/config/group/openapi/EndpointGroupingRuleReader4Openapi.java
Show resolved
Hide resolved
…doesn't set service name and in root folder directly
wu-sheng
reviewed
Jun 19, 2021
kezhenxu94
previously approved these changes
Jun 19, 2021
Comment on lines
47
to
51
| rule.addGroupedRule("serviceA", "GET:/products1/{id}/" + +i, "GET:/products1/([^/]+)/" + i); | ||
| rule.addGroupedRule("serviceA", "POST:/products1/{id}/" + +i, "POST:/products1/([^/]+)/" + i); | ||
| rule.addGroupedRule("serviceA", "GET:/products2/{id}/" + +i, "GET:/products2/([^/]+)/" + i); | ||
| rule.addGroupedRule("serviceA", "POST:/products3/{id}/" + +i, "POST:/products3/([^/]+)/" + i); | ||
| rule.addGroupedRule("serviceA", "GET:/products3/{id}/" + +i, "GET:/products3/([^/]+)/" + i); |
Member
There was a problem hiding this comment.
Not important though, "GET:/products1/{id}/" + +i looks tricky, why not just "GET:/products1/{id}/" + i?
Update:
I think what you want is "GET:/products1/{id}/" + ++i
Member
There was a problem hiding this comment.
Haha, interesting, it is better to fix before merge.
Member
Author
There was a problem hiding this comment.
thanks, @kezhenxu94, I tested +i but forgot to remove them.
Comment on lines
68
to
72
| rule.addGroupedRule("serviceA", "GET:/products1/{id}/" + +i, "GET:/products1/([^/]+)/" + i); | ||
| rule.addGroupedRule("serviceA", "POST:/products1/{id}/" + +i, "POST:/products1/([^/]+)/" + i); | ||
| rule.addGroupedRule("serviceA", "GET:/products2/{id}/" + +i, "GET:/products2/([^/]+)/" + i); | ||
| rule.addGroupedRule("serviceA", "POST:/products3/{id}/" + +i, "POST:/products3/([^/]+)/" + i); | ||
| rule.addGroupedRule("serviceA", "GET:/products3/{id}/" + +i, "GET:/products3/([^/]+)/" + i); |
Comment on lines
89
to
93
| rule.addGroupedRule("serviceA", "GET:/products1/{id}/" + +i, "GET:/products1/([^/]+)/" + i); | ||
| rule.addGroupedRule("serviceA", "POST:/products1/{id}/" + +i, "POST:/products1/([^/]+)/" + i); | ||
| rule.addGroupedRule("serviceA", "GET:/products2/{id}/" + +i, "GET:/products2/([^/]+)/" + i); | ||
| rule.addGroupedRule("serviceA", "POST:/products3/{id}/" + +i, "POST:/products3/([^/]+)/" + i); | ||
| rule.addGroupedRule("serviceA", "GET:/products3/{id}/" + +i, "GET:/products3/([^/]+)/" + i); |
wu-sheng
approved these changes
Jun 19, 2021
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Support endpoint name grouping by OpenAPI definitions
If this is non-trivial feature, paste the links/URLs to the design doc.
Update the documentation to include this new feature.
Tests(including UT, IT, E2E) are added to verify the new feature.
If it's UI related, attach the screenshots below.
If this pull request closes/resolves/fixes an existing issue, replace the issue number. Closes #.
Update the
CHANGESlog.Related to #7113
More information about the feature please see
docs/en/setup/backend/endpoint-grouping-rules.md