You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by GitBox <gi...@apache.org> on 2020/03/06 10:06:32 UTC

[GitHub] [hadoop-ozone] runzhiwang opened a new pull request #645: HDDS-3130. Add jaeger trace span in s3gateway

runzhiwang opened a new pull request #645: HDDS-3130. Add jaeger trace span in s3gateway
URL: https://github.com/apache/hadoop-ozone/pull/645
 
 
   ## What changes were proposed in this pull request?
   
   add jaeger trace span in s3gateway.
   
   ## What is the link to the Apache JIRA
   
   https://jira.apache.org/jira/browse/HDDS-3130
   
   ## How was this patch tested?
   
   The jaeger UI shows the right trace information.
   
   ![image](https://user-images.githubusercontent.com/51938049/76073806-316b2680-5fd5-11ea-9fcf-d6fac8e3de26.png)
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: ozone-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: ozone-issues-help@hadoop.apache.org


[GitHub] [hadoop-ozone] runzhiwang opened a new pull request #645: HDDS-3130. Add jaeger trace span in s3gateway

Posted by GitBox <gi...@apache.org>.
runzhiwang opened a new pull request #645: HDDS-3130. Add jaeger trace span in s3gateway
URL: https://github.com/apache/hadoop-ozone/pull/645
 
 
   ## What changes were proposed in this pull request?
   
   Add jaeger trace span in s3gateway.
   
   ## What is the link to the Apache JIRA
   
   https://jira.apache.org/jira/browse/HDDS-3130
   
   ## How was this patch tested?
   
   The jaeger UI shows the right trace information.
   ![image](https://user-images.githubusercontent.com/51938049/76082799-1ef9e880-5fe7-11ea-8f02-0f74fee7d435.png)
   
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: ozone-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: ozone-issues-help@hadoop.apache.org


[GitHub] [hadoop-ozone] elek closed pull request #645: HDDS-3130. Add jaeger trace span in s3gateway

Posted by GitBox <gi...@apache.org>.
elek closed pull request #645: HDDS-3130. Add jaeger trace span in s3gateway
URL: https://github.com/apache/hadoop-ozone/pull/645
 
 
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: ozone-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: ozone-issues-help@hadoop.apache.org


[GitHub] [hadoop-ozone] runzhiwang opened a new pull request #645: HDDS-3130. Add jaeger trace span in s3gateway

Posted by GitBox <gi...@apache.org>.
runzhiwang opened a new pull request #645: HDDS-3130. Add jaeger trace span in s3gateway
URL: https://github.com/apache/hadoop-ozone/pull/645
 
 
   ## What changes were proposed in this pull request?
   
   Add jaeger trace span in s3gateway.
   
   ## What is the link to the Apache JIRA
   
   https://jira.apache.org/jira/browse/HDDS-3130
   
   ## How was this patch tested?
   
   The jaeger UI shows the right trace information.
   ![image](https://user-images.githubusercontent.com/51938049/76082799-1ef9e880-5fe7-11ea-8f02-0f74fee7d435.png)
   
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: ozone-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: ozone-issues-help@hadoop.apache.org


[GitHub] [hadoop-ozone] runzhiwang opened a new pull request #645: HDDS-3130. Add jaeger trace span in s3gateway

Posted by GitBox <gi...@apache.org>.
runzhiwang opened a new pull request #645: HDDS-3130. Add jaeger trace span in s3gateway
URL: https://github.com/apache/hadoop-ozone/pull/645
 
 
   ## What changes were proposed in this pull request?
   
   Add jaeger trace span in s3gateway.
   
   ## What is the link to the Apache JIRA
   
   https://jira.apache.org/jira/browse/HDDS-3130
   
   ## How was this patch tested?
   
   The jaeger UI shows the right trace information.
   ![image](https://user-images.githubusercontent.com/51938049/76082799-1ef9e880-5fe7-11ea-8f02-0f74fee7d435.png)
   
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: ozone-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: ozone-issues-help@hadoop.apache.org


[GitHub] [hadoop-ozone] runzhiwang closed pull request #645: HDDS-3130. Add jaeger trace span in s3gateway

Posted by GitBox <gi...@apache.org>.
runzhiwang closed pull request #645: HDDS-3130. Add jaeger trace span in s3gateway
URL: https://github.com/apache/hadoop-ozone/pull/645
 
 
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: ozone-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: ozone-issues-help@hadoop.apache.org


[GitHub] [hadoop-ozone] runzhiwang edited a comment on issue #645: HDDS-3130. Add jaeger trace span in s3gateway

Posted by GitBox <gi...@apache.org>.
runzhiwang edited a comment on issue #645: HDDS-3130. Add jaeger trace span in s3gateway
URL: https://github.com/apache/hadoop-ozone/pull/645#issuecomment-599356232
 
 
   @elek Hi, I have updated PR according to you suggestion, thank you very much. Additionally, if throw exception when execute request, the method `public void filter(ContainerRequestContext requestContext, ContainerResponseContext responseContext)` will not be executed, and span can not be finished, then the following jaeger span will have a error parent, just as the image shows. So I finish the old span before build a new span in `finishPreSpan`. Besides, `scope.close` also can not be ignored.
   ![image](https://user-images.githubusercontent.com/51938049/76726463-290cab80-678c-11ea-92ab-bbefda5d9c1a.png)
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: ozone-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: ozone-issues-help@hadoop.apache.org


[GitHub] [hadoop-ozone] runzhiwang closed pull request #645: HDDS-3130. Add jaeger trace span in s3gateway

Posted by GitBox <gi...@apache.org>.
runzhiwang closed pull request #645: HDDS-3130. Add jaeger trace span in s3gateway
URL: https://github.com/apache/hadoop-ozone/pull/645
 
 
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: ozone-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: ozone-issues-help@hadoop.apache.org


[GitHub] [hadoop-ozone] runzhiwang opened a new pull request #645: HDDS-3130. Add jaeger trace span in s3gateway

Posted by GitBox <gi...@apache.org>.
runzhiwang opened a new pull request #645: HDDS-3130. Add jaeger trace span in s3gateway
URL: https://github.com/apache/hadoop-ozone/pull/645
 
 
   ## What changes were proposed in this pull request?
   
   Add jaeger trace span in s3gateway.
   
   ## What is the link to the Apache JIRA
   
   https://jira.apache.org/jira/browse/HDDS-3130
   
   ## How was this patch tested?
   
   The jaeger UI shows the right trace information.
   ![image](https://user-images.githubusercontent.com/51938049/76082799-1ef9e880-5fe7-11ea-8f02-0f74fee7d435.png)
   
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: ozone-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: ozone-issues-help@hadoop.apache.org


[GitHub] [hadoop-ozone] runzhiwang closed pull request #645: HDDS-3130. Add jaeger trace span in s3gateway

Posted by GitBox <gi...@apache.org>.
runzhiwang closed pull request #645: HDDS-3130. Add jaeger trace span in s3gateway
URL: https://github.com/apache/hadoop-ozone/pull/645
 
 
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: ozone-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: ozone-issues-help@hadoop.apache.org


[GitHub] [hadoop-ozone] runzhiwang opened a new pull request #645: HDDS-3130. Add jaeger trace span in s3gateway

Posted by GitBox <gi...@apache.org>.
runzhiwang opened a new pull request #645: HDDS-3130. Add jaeger trace span in s3gateway
URL: https://github.com/apache/hadoop-ozone/pull/645
 
 
   ## What changes were proposed in this pull request?
   
   Add jaeger trace span in s3gateway.
   
   ## What is the link to the Apache JIRA
   
   https://jira.apache.org/jira/browse/HDDS-3130
   
   ## How was this patch tested?
   
   The jaeger UI shows the right trace information.
   ![image](https://user-images.githubusercontent.com/51938049/76082799-1ef9e880-5fe7-11ea-8f02-0f74fee7d435.png)
   
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: ozone-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: ozone-issues-help@hadoop.apache.org


[GitHub] [hadoop-ozone] runzhiwang commented on issue #645: HDDS-3130. Add jaeger trace span in s3gateway

Posted by GitBox <gi...@apache.org>.
runzhiwang commented on issue #645: HDDS-3130. Add jaeger trace span in s3gateway
URL: https://github.com/apache/hadoop-ozone/pull/645#issuecomment-595758870
 
 
   @elek Could you help review this patch ? Thank you very much.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: ozone-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: ozone-issues-help@hadoop.apache.org


[GitHub] [hadoop-ozone] runzhiwang commented on issue #645: HDDS-3130. Add jaeger trace span in s3gateway

Posted by GitBox <gi...@apache.org>.
runzhiwang commented on issue #645: HDDS-3130. Add jaeger trace span in s3gateway
URL: https://github.com/apache/hadoop-ozone/pull/645#issuecomment-597972397
 
 
   @elek Very reasonable suggestion. I will try it, thank you very much.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: ozone-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: ozone-issues-help@hadoop.apache.org


[GitHub] [hadoop-ozone] runzhiwang commented on issue #645: HDDS-3130. Add jaeger trace span in s3gateway

Posted by GitBox <gi...@apache.org>.
runzhiwang commented on issue #645: HDDS-3130. Add jaeger trace span in s3gateway
URL: https://github.com/apache/hadoop-ozone/pull/645#issuecomment-599356232
 
 
   @elek Hi, I have updated PR according to you suggestion, thank you very much. Additionally, if throw exception when execute request, the method `public void filter(ContainerRequestContext requestContext, ContainerResponseContext responseContext)` will not be executed, and span can not be finished, then the following jaeger span will have a error parent, just as the image shows. So I finish the old span before build a new span. Besides, `scope.close` also can not be ignored.
   ![image](https://user-images.githubusercontent.com/51938049/76726463-290cab80-678c-11ea-92ab-bbefda5d9c1a.png)
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: ozone-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: ozone-issues-help@hadoop.apache.org


[GitHub] [hadoop-ozone] runzhiwang closed pull request #645: HDDS-3130. Add jaeger trace span in s3gateway

Posted by GitBox <gi...@apache.org>.
runzhiwang closed pull request #645: HDDS-3130. Add jaeger trace span in s3gateway
URL: https://github.com/apache/hadoop-ozone/pull/645
 
 
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: ozone-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: ozone-issues-help@hadoop.apache.org


[GitHub] [hadoop-ozone] runzhiwang opened a new pull request #645: HDDS-3130. Add jaeger trace span in s3gateway

Posted by GitBox <gi...@apache.org>.
runzhiwang opened a new pull request #645: HDDS-3130. Add jaeger trace span in s3gateway
URL: https://github.com/apache/hadoop-ozone/pull/645
 
 
   ## What changes were proposed in this pull request?
   
   Add jaeger trace span in s3gateway.
   
   ## What is the link to the Apache JIRA
   
   https://jira.apache.org/jira/browse/HDDS-3130
   
   ## How was this patch tested?
   
   The jaeger UI shows the right trace information.
   ![image](https://user-images.githubusercontent.com/51938049/76082799-1ef9e880-5fe7-11ea-8f02-0f74fee7d435.png)
   
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: ozone-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: ozone-issues-help@hadoop.apache.org


[GitHub] [hadoop-ozone] runzhiwang closed pull request #645: HDDS-3130. Add jaeger trace span in s3gateway

Posted by GitBox <gi...@apache.org>.
runzhiwang closed pull request #645: HDDS-3130. Add jaeger trace span in s3gateway
URL: https://github.com/apache/hadoop-ozone/pull/645
 
 
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: ozone-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: ozone-issues-help@hadoop.apache.org


[GitHub] [hadoop-ozone] runzhiwang commented on issue #645: HDDS-3130. Add jaeger trace span in s3gateway

Posted by GitBox <gi...@apache.org>.
runzhiwang commented on issue #645: HDDS-3130. Add jaeger trace span in s3gateway
URL: https://github.com/apache/hadoop-ozone/pull/645#issuecomment-607597555
 
 
   @elek CI passed.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: ozone-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: ozone-issues-help@hadoop.apache.org


[GitHub] [hadoop-ozone] elek commented on issue #645: HDDS-3130. Add jaeger trace span in s3gateway

Posted by GitBox <gi...@apache.org>.
elek commented on issue #645: HDDS-3130. Add jaeger trace span in s3gateway
URL: https://github.com/apache/hadoop-ozone/pull/645#issuecomment-597710811
 
 
   Thank you very much the idea and the patch @runzhiwang I 100% support to introduce tracing for s3g. It's a very good idea.
   
   About the implementation: It's definitely a step forward but I started to think how is it possible to do in a transparent way without duplication. I check if the resource name is available from some generic filter and it seems to be possible.
   
   My proposal is to do it from a central place, something like this:
   
   ```
   @Provider
   public class TracingFilter implements ContainerRequestFilter,
       ContainerResponseFilter {
   
     public static final String TRACING_SCOPE = "TRACING_SCOPE";
   
     @Context
     private ResourceInfo resourceInfo;
   
     @Override
     public void filter(ContainerRequestContext requestContext)
         throws IOException {
       Scope scope = GlobalTracer.get().buildSpan(
           resourceInfo.getResourceClass().getSimpleName() + "." + resourceInfo
               .getResourceMethod().getName()).startActive(true);
   
       requestContext.setProperty(TRACING_SCOPE, scope);
     }
   
     @Override
     public void filter(ContainerRequestContext requestContext,
         ContainerResponseContext responseContext) throws IOException {
   
       Object scope = requestContext.getProperty(TRACING_SCOPE);
       if (scope != null) {
         ((Scope) scope).span().finish();
       }
     }
   }
   ``` 
   
   What do you think? I think it would simplify this patch (you don't need to modify all the methods...)

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: ozone-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: ozone-issues-help@hadoop.apache.org


[GitHub] [hadoop-ozone] runzhiwang edited a comment on issue #645: HDDS-3130. Add jaeger trace span in s3gateway

Posted by GitBox <gi...@apache.org>.
runzhiwang edited a comment on issue #645: HDDS-3130. Add jaeger trace span in s3gateway
URL: https://github.com/apache/hadoop-ozone/pull/645#issuecomment-599356232
 
 
   @elek Hi, I have updated PR according to you suggestion, thank you very much. Additionally, if throw exception when execute request, the method `public void filter(ContainerRequestContext requestContext, ContainerResponseContext responseContext)` will not be executed, and span can not be finished, then the following jaeger span will have a error parent, just as the image shows. So I finish the old span before build a new span in `finishPreSpan()`. Besides, `scope.close` also can not be ignored.
   ![image](https://user-images.githubusercontent.com/51938049/76726463-290cab80-678c-11ea-92ab-bbefda5d9c1a.png)
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: ozone-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: ozone-issues-help@hadoop.apache.org


[GitHub] [hadoop-ozone] runzhiwang closed pull request #645: HDDS-3130. Add jaeger trace span in s3gateway

Posted by GitBox <gi...@apache.org>.
runzhiwang closed pull request #645: HDDS-3130. Add jaeger trace span in s3gateway
URL: https://github.com/apache/hadoop-ozone/pull/645
 
 
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: ozone-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: ozone-issues-help@hadoop.apache.org


[GitHub] [hadoop-ozone] runzhiwang edited a comment on issue #645: HDDS-3130. Add jaeger trace span in s3gateway

Posted by GitBox <gi...@apache.org>.
runzhiwang edited a comment on issue #645: HDDS-3130. Add jaeger trace span in s3gateway
URL: https://github.com/apache/hadoop-ozone/pull/645#issuecomment-599356232
 
 
   @elek Hi, I have updated PR according to you suggestion, thank you very much. Additionally, if throw exception when execute request, the method `public void filter(ContainerRequestContext requestContext, ContainerResponseContext responseContext)` will not be executed, and span can not be finished, then the following jaeger span will have a error parent, just as the image shows. So I finish the old span before build a new span in `closeActiveScope`. Besides, `scope.close` also can not be ignored.
   ![image](https://user-images.githubusercontent.com/51938049/76726463-290cab80-678c-11ea-92ab-bbefda5d9c1a.png)
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: ozone-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: ozone-issues-help@hadoop.apache.org


[GitHub] [hadoop-ozone] runzhiwang commented on issue #645: HDDS-3130. Add jaeger trace span in s3gateway

Posted by GitBox <gi...@apache.org>.
runzhiwang commented on issue #645: HDDS-3130. Add jaeger trace span in s3gateway
URL: https://github.com/apache/hadoop-ozone/pull/645#issuecomment-601491776
 
 
   The CI failure has nothing to do with this PR.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: ozone-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: ozone-issues-help@hadoop.apache.org


[GitHub] [hadoop-ozone] elek edited a comment on issue #645: HDDS-3130. Add jaeger trace span in s3gateway

Posted by GitBox <gi...@apache.org>.
elek edited a comment on issue #645: HDDS-3130. Add jaeger trace span in s3gateway
URL: https://github.com/apache/hadoop-ozone/pull/645#issuecomment-597710811
 
 
   Thank you very much the idea and the patch @runzhiwang I 100% support to introduce tracing for s3g. It's a very good idea.
   
   About the implementation: It's definitely a step forward but I started to think how is it possible to do in a transparent way without duplication. I check if the resource name is available from some generic filter and it seems to be possible.
   
   My proposal is to do it from a central place, something like this:
   
   ```java
   @Provider
   public class TracingFilter implements ContainerRequestFilter,
       ContainerResponseFilter {
   
     public static final String TRACING_SCOPE = "TRACING_SCOPE";
   
     @Context
     private ResourceInfo resourceInfo;
   
     @Override
     public void filter(ContainerRequestContext requestContext)
         throws IOException {
       Scope scope = GlobalTracer.get().buildSpan(
           resourceInfo.getResourceClass().getSimpleName() + "." + resourceInfo
               .getResourceMethod().getName()).startActive(true);
   
       requestContext.setProperty(TRACING_SCOPE, scope);
     }
   
     @Override
     public void filter(ContainerRequestContext requestContext,
         ContainerResponseContext responseContext) throws IOException {
   
       Object scope = requestContext.getProperty(TRACING_SCOPE);
       if (scope != null) {
         ((Scope) scope).span().finish();
       }
     }
   }
   ``` 
   
   What do you think? I think it would simplify this patch (you don't need to modify all the methods...)

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: ozone-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: ozone-issues-help@hadoop.apache.org