You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by GitBox <gi...@apache.org> on 2021/07/16 13:09:26 UTC

[GitHub] [skywalking] wu-sheng commented on a change in pull request #5886: fix gateway plugin async finish repeatedly when fallback configured

wu-sheng commented on a change in pull request #5886:
URL: https://github.com/apache/skywalking/pull/5886#discussion_r671241153



##########
File path: apm-sniffer/optional-plugins/optional-spring-plugins/spring-webflux-5.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/spring/webflux/v5/DispatcherHandlerHandleMethodInterceptor.java
##########
@@ -77,13 +77,14 @@ public void beforeMethod(EnhancedInstance objInst, Method method, Object[] allAr
         exchange.getAttributes().put("SKYWALING_SPAN", span);
     }
     
-    private void setPattern(AbstractSpan span, ServerWebExchange exchange) {
+    private void maybeSetPattern(AbstractSpan span, ServerWebExchange exchange) {
         if (span != null) {
-            Object pathPattern = exchange.getAttribute(HandlerMapping.BEST_MATCHING_PATTERN_ATTRIBUTE);
-            if (pathPattern != null) {
-                span.setOperationName(((PathPattern) pathPattern).getPatternString());
+            PathPattern pathPattern = exchange.getAttribute(HandlerMapping.BEST_MATCHING_PATTERN_ATTRIBUTE);
+            if (pathPattern != null && pathPattern.matches(exchange.getRequest().getPath().pathWithinApplication())) {

Review comment:
       What does `pathPattern.matches(exchange.getRequest().getPath().pathWithinApplication())` mean? Could you add comments about this?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org