-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
Feature: support endpoint name grouping by OpenAPI definitions. #7130
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
...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 <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM once CI pass. Thanks!!!
.../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
...ache/skywalking/oap/server/core/config/group/openapi/EndpointGroupingRuleReader4Openapi.java
Show resolved
Hide resolved
…doesn't set service name and in root folder directly
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is good for me. Thanks.
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); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Haha, interesting, it is better to fix before merge.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks, @kezhenxu94, I tested +i
but forgot to remove them.
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); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here
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); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And here
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
CHANGES
log.Related to #7113
More information about the feature please see
docs/en/setup/backend/endpoint-grouping-rules.md