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 2020/12/03 16:16:15 UTC

[GitHub] [skywalking] ldy edited a comment on issue #5906: Spring cloud gateway project logback cannot print TraceID

ldy edited a comment on issue #5906:
URL: https://github.com/apache/skywalking/issues/5906#issuecomment-738107449


   Sorry take too long to give a reply.Please see the demo in [Spring Cloud Gateway Demo](https://github.com/ldy/demo).
   
   Below is new project lib version:
   `SpringBoot:2.3.1.RELEASE,Spring Cloud:Hoxton.SR8,Spring Cloud Gateway:2.2.5,apm-toolkit-logback-1.x:6.6.0,Skywalking:8.2.0`
   
   There are three situation:
   
   First,when use default netty container,in gateway service,i can't print tid on console,only show [TID:N/A].In other service,logback can print tid normal.
   ![tomcat](https://user-images.githubusercontent.com/12880699/101053563-e3ff0280-35c2-11eb-9f5e-14762b329c18.png)
   
   Second,when use tomcat container,in gateway service,i can print the tid in my code when i use `String traceId = TraceContext.traceId();`,but in response filter logback partly cannot print tid,only show [TID:N/A].In other service,logback can print tid normal.
   ![tomcat-pom](https://user-images.githubusercontent.com/12880699/101056170-aa7bc680-35c5-11eb-9e53-2ba296fc8fbb.png)
   
   ![tomcat2](https://user-images.githubusercontent.com/12880699/101054943-6805ba00-35c4-11eb-9e4b-27bf09642001.png)
   
   
   Thirdly,when use  jetty container,in gateway service,i can print the tid in my code when i use `String traceId = TraceContext.traceId();`,but in response filter logback partly cannot print tid,only show [TID:N/A].In other service,logback can print tid normal.
   ![jetty-pom](https://user-images.githubusercontent.com/12880699/101056187-ae0f4d80-35c5-11eb-828b-48819275b78c.png)
   
   ![jetty2](https://user-images.githubusercontent.com/12880699/101054947-689e5080-35c4-11eb-82e7-34c2896f5526.png)
   
   Another question,is there any way to let skywalking support spring cloud gateway default netty container?


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