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 2022/03/17 07:01:52 UTC

[GitHub] [skywalking] PepoRobert opened a new issue #8695: [Bug] SkyWalking Java agent okhttp plugin Wrong url used to create house

PepoRobert opened a new issue #8695:
URL: https://github.com/apache/skywalking/issues/8695


   ### Search before asking
   
   - [X] I had searched in the [issues](https://github.com/apache/skywalking/issues?q=is%3Aissue) and found no similar issues.
   
   
   ### Apache SkyWalking Component
   
   Java Agent (apache/skywalking-java)
   
   ### What happened
   
   OkHttp allow user to rewrite the request using Interceptors.When we use Interceptor to implement dynamic routing.
   We found creating the wrong span.
   
   ![image](https://user-images.githubusercontent.com/27007840/158752329-a8681227-7029-40dc-94ac-f26c96156b40.png)
   
   
   ### What you expected to happen
   
   Create span based on the actual requested address
   
   ### How to reproduce
   
     private static OkHttpClient client = new OkHttpClient.Builder().addInterceptor(new Interceptor() {
           @Override
           public Response intercept(Chain chain) throws IOException {
               final Request request = chain.request();
               return chain.proceed(request.newBuilder().url("http://localhost:8080/trace").build());
           }
       }).build();
   
       public static String run(String url) throws IOException {
           Request request = new Request.Builder()
                   .url(url)
                   .build();
           try (Response response = client.newCall(request).execute()) {
               return response.body().string();
           }
       }
   
       public static void main(String[] args) throws IOException {
           run("http://localhost:8080/hi");
       }
   
   ### Anything else
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [X] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
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



[GitHub] [skywalking] wu-sheng closed issue #8695: [Bug] SkyWalking Java agent okhttp plugin Wrong url used to create span

Posted by GitBox <gi...@apache.org>.
wu-sheng closed issue #8695:
URL: https://github.com/apache/skywalking/issues/8695


   


-- 
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



[GitHub] [skywalking] wu-sheng commented on issue #8695: [Bug] SkyWalking Java agent okhttp plugin Wrong url used to create span

Posted by GitBox <gi...@apache.org>.
wu-sheng commented on issue #8695:
URL: https://github.com/apache/skywalking/issues/8695#issuecomment-1070391651


   Assigned to @PepoRobert as `Yes I am willing to submit a PR!` checked.


-- 
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



[GitHub] [skywalking] wu-sheng commented on issue #8695: [Bug] SkyWalking Java agent okhttp plugin Wrong url used to create span

Posted by GitBox <gi...@apache.org>.
wu-sheng commented on issue #8695:
URL: https://github.com/apache/skywalking/issues/8695#issuecomment-1085478661


   No update for 2 weeks.


-- 
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