tedli commented on pull request #73:
URL: https://github.com/apache/skywalking-java/pull/73#issuecomment-989579748


   Hi @wu-sheng ,
   
   I found that if using the same scenario test code like dubbo 2.7.x, the 
consumer proxy object will use an InJvmInvoker, or if explicitly set inJvm to 
false, a DubboInvoker will be used, neither of them loads filters.
   
    Then I ran a 
[EmbeddedZooKeeper](https://github.com/apache/dubbo-samples/blob/master/dubbo-samples-echo/src/main/java/org/apache/dubbo/samples/echo/EmbeddedZooKeeper.java),
 by using a registry, 
   
   
https://github.com/apache/dubbo/blob/5a5e3f3fd7d0482b6124bd5b52b10f4900856438/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/filter/ProtocolFilterWrapper.java#L68-L75
   
   ```java
   @Override
   public <T> Invoker<T> refer(Class<T> type, URL url) throws RpcException {
       if (UrlUtils.isRegistry(url)) {
           return protocol.refer(type, url);
       }
       FilterChainBuilder builder = getFilterChainBuilder(url);
       return builder.buildInvokerChain(protocol.refer(type, url), 
REFERENCE_FILTER_KEY, CommonConstants.CONSUMER);
   }
   ```
   
   the consumer proxy object loads filters. So skywalking interceptor on 
consumer side affects. The produced spans are as expect.
   
   ```yaml
   segmentItems:
   - serviceName: dubbo-3.x-scenario
     segmentSize: 3
     segments:
     - segmentId: 42afe68bf5ad435787439867ed63a554.64.16390270335870000
       spans:
       - operationName: HEAD:/dubbo-3.x-scenario/case/healthCheck
         operationId: 0
         parentSpanId: -1
         spanId: 0
         spanLayer: Http
         startTime: 1639027033589
         endTime: 1639027033684
         componentId: 1
         isError: false
         spanType: Entry
         peer: ''
         skipAnalysis: false
         tags:
         - {key: url, value: 
'http://localhost:8080/dubbo-3.x-scenario/case/healthCheck'}
         - {key: http.method, value: HEAD}
     - segmentId: 42afe68bf5ad435787439867ed63a554.86.16390270340630000
       spans:
       - operationName: 
org.apache.skywalking.apm.testcase.dubbo3.services.GreetService.doBusiness(String)
         operationId: 0
         parentSpanId: -1
         spanId: 0
         spanLayer: RPCFramework
         startTime: 1639027034063
         endTime: 1639027034068
         componentId: 3
         isError: false
         spanType: Entry
         peer: 172.17.0.2:40328
         skipAnalysis: false
         tags:
         - {key: url, value: 
'dubbo://172.17.0.2:20080/org.apache.skywalking.apm.testcase.dubbo3.services.GreetService.doBusiness(String)'}
         - {key: arguments, value: helloWorld}
         refs:
         - {parentEndpoint: 'GET:/dubbo-3.x-scenario/case/dubbo', 
networkAddress: '172.17.0.2:0',
           refType: CrossProcess, parentSpanId: 1, parentTraceSegmentId: 
42afe68bf5ad435787439867ed63a554.65.16390270336920000,
           parentServiceInstance: [email protected], 
parentService: dubbo-3.x-scenario,
           traceId: 42afe68bf5ad435787439867ed63a554.65.16390270336920001}
     - segmentId: 42afe68bf5ad435787439867ed63a554.65.16390270336920000
       spans:
       - operationName: 
org.apache.skywalking.apm.testcase.dubbo3.services.GreetService.doBusiness(String)
         operationId: 0
         parentSpanId: 0
         spanId: 1
         spanLayer: RPCFramework
         startTime: 1639027033946
         endTime: 1639027034073
         componentId: 3
         isError: false
         spanType: Exit
         peer: 172.17.0.2:0
         skipAnalysis: false
         tags:
         - {key: url, value: 
'dubbo://172.17.0.2:0/org.apache.skywalking.apm.testcase.dubbo3.services.GreetService.doBusiness(String)'}
         - {key: arguments, value: helloWorld}
       - operationName: GET:/dubbo-3.x-scenario/case/dubbo
         operationId: 0
         parentSpanId: -1
         spanId: 0
         spanLayer: Http
         startTime: 1639027033692
         endTime: 1639027034075
         componentId: 1
         isError: false
         spanType: Entry
         peer: ''
         skipAnalysis: false
         tags:
         - {key: url, value: 
'http://localhost:8080/dubbo-3.x-scenario/case/dubbo'}
         - {key: http.method, value: GET}
   ```
   
   However, because a registry is used, the `address` no longer be the 
`localhost` and depends. So the `expectedData.yaml` can't keep using 
`localhost`.
   
   And I didn't find something like `startWith`, `contains`, `endWith` in the 
skywalking-agent-test-tool, can I simply use `not null`?


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to