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/02/28 08:22:33 UTC

[GitHub] [skywalking] kehuili opened a new issue #8603: [Feature] python gRPC plugin

kehuili opened a new issue #8603:
URL: https://github.com/apache/skywalking/issues/8603


   ### Search before asking
   
   - [X] I had searched in the [issues](https://github.com/apache/skywalking/issues?q=is%3Aissue) and found no similar feature requirement.
   
   
   ### Description
   
   I have implemented a gRPC plugin for python, and interceptors([client-side](https://grpc.github.io/grpc/python/grpc.html#client-side-interceptor) and [server-side](https://grpc.github.io/grpc/python/grpc.html#service-side-interceptor)) were used to achieve this. 
   
   But in developer guide and plugins already implemented, it seems to be a different way to implement a plugin.
   > Inside the install method, you find out the relevant method(s) of the libraries that you plan to instrument, and create/close spans before/after those method(s).
   
   I was wondering if I make a PR, is interceptors acceptable, or it is a better way to follow what's said in developer guide.
   
   ### Use case
   
   Use python gRPC plugin to track gRPC requests
   
   ### Related issues
   
   _No response_
   
   ### Are you willing to submit a 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] kehuili commented on issue #8603: [Feature] python gRPC plugin

Posted by GitBox <gi...@apache.org>.
kehuili commented on issue #8603:
URL: https://github.com/apache/skywalking/issues/8603#issuecomment-1054017900


   Got it. Gonna find a proper way to implement it.


-- 
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 #8603: [Feature] python gRPC plugin

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


   > Got it. Gonna find a proper way to implement it.
   
   If this is not ready yet, should we move this to the discussion channel?


-- 
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] kezhenxu94 edited a comment on issue #8603: [Feature] python gRPC plugin

Posted by GitBox <gi...@apache.org>.
kezhenxu94 edited a comment on issue #8603:
URL: https://github.com/apache/skywalking/issues/8603#issuecomment-1054011855


   > I was wondering if I make a PR, is interceptors acceptable, or it is a better way to follow what's said in developer guide.
   
   If I understand correctly, you mean you have interceptors that users can use in their code, but SkyWalking Python agent aims to do the interception automatically, so I think what you need is to find out a proper point and insert your interceptors (automatically) into the process chain


-- 
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] kehuili commented on issue #8603: [Feature] python gRPC plugin

Posted by GitBox <gi...@apache.org>.
kehuili commented on issue #8603:
URL: https://github.com/apache/skywalking/issues/8603#issuecomment-1054022158


   > If this is not ready yet, should we move this to the discussion channel?
   
   Sure.
   


-- 
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] kezhenxu94 commented on issue #8603: [Feature] python gRPC plugin

Posted by GitBox <gi...@apache.org>.
kezhenxu94 commented on issue #8603:
URL: https://github.com/apache/skywalking/issues/8603#issuecomment-1054013266


   @kehuili you can see the same method in our Java agent, we have [interceptor](https://github.com/apache/skywalking-java/blob/main/apm-sniffer/apm-sdk-plugin/grpc-1.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/grpc/v1/server/ServerInterceptor.java) and [a point](https://github.com/apache/skywalking-java/blob/74b130c8271a692a217e629f4126c1043b0204e3/apm-sniffer/apm-sdk-plugin/grpc-1.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/grpc/v1/server/AbstractServerImplBuilderInterceptor.java#L31-L38) to insert that interceptor automatically.


-- 
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] kezhenxu94 commented on issue #8603: [Feature] python gRPC plugin

Posted by GitBox <gi...@apache.org>.
kezhenxu94 commented on issue #8603:
URL: https://github.com/apache/skywalking/issues/8603#issuecomment-1054011855


   > I was wondering if I make a PR, is interceptors acceptable, or it is a better way to follow what's said in developer guide.
   
   If I understand correctly, you mean you have interceptors that users can use in there code, but SkyWalking Python agent aims to do the interception automatically, so I think what you need is to find out a proper point and insert your interceptors (automatically) into the process chain


-- 
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 #8603: [Feature] python gRPC plugin

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


   > Inside the install method, you find out the relevant method(s) of the libraries that you plan to instrument, and create/close spans before/after those method(s).
   
   This is general guidance, not a strict rule. 
   
   Usually, it is also common to intercept or implement filters to get the same purpose. The key point is, your plugin should be auto instrumentation, don't need to change the target service's source codes.


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