spring-cloud-sleuth icon indicating copy to clipboard operation
spring-cloud-sleuth copied to clipboard

when i do a feign request in rabbit consumer method, the feign request lost tracer info

Open sunset535 opened this issue 3 years ago • 3 comments

my sleuth version is 2.2.2.RELEASE. i found if i use @RabbitListener annotation, feign request in consumer method will get the correct tracer info. but when i use the custom annotation as the rabbit consumer method, the feign request will lost the tracer info.
my custom rabbit consumer method just use a reflection, nothing else. image if i use RabbitTemplate's BeforePublishPostProcessors and SimpleMessageListenerContainer's AfterReceivePostProcessors , i could get the tracer info when my custom method get the message, but i dont know how to use the MDC info througn inflection to the feign request, of course i had try if i specify the custom method run in LazyTraceAsyncTaskExecutor or LazyTraceExecutor, the both all still doesn't work. i want to consult, is there any special usage to my scene, or my usage is wrong, how could i fix it?

sunset535 avatar Sep 19 '22 10:09 sunset535

Please upgrade to the latest supported version and try again

marcingrzejszczak avatar Sep 19 '22 14:09 marcingrzejszczak

my cloud version is Hoxton.SR3, it‘s match the sleuth version is 2.2.2.RELEASE.

sunset535 avatar Sep 20 '22 02:09 sunset535

You can check the support dates over here https://spring.io/projects/spring-cloud-sleuth#support , pick a version that is still supported

marcingrzejszczak avatar Sep 20 '22 10:09 marcingrzejszczak

You can check the support dates over here https://spring.io/projects/spring-cloud-sleuth#support , pick a version that is still supported

i have take1 week to upgrade my cloud, but this problem still exist. image

image

image

image

sunset535 avatar Sep 26 '22 14:09 sunset535

You're using an unsupported version, please upgrade to the newest supported version and if the problem persists please open a new issue with a reproducer.

marcingrzejszczak avatar Sep 26 '22 14:09 marcingrzejszczak

You're using an unsupported version, please upgrade to the newest supported version and if the problem persists please open a new issue with a reproducer.

my spring cloud version 2021.0.4, it's an unsupported version?

sunset535 avatar Sep 27 '22 02:09 sunset535

A few days ago you said:

my cloud version is Hoxton.SR3, it‘s match the sleuth version is 2.2.2.RELEASE.

Which is unsupported.

jonatan-ivanov avatar Sep 28 '22 03:09 jonatan-ivanov

A few days ago you said:

my cloud version is Hoxton.SR3, it‘s match the sleuth version is 2.2.2.RELEASE.

Which is unsupported.

i have upgraded to 2021.0.4, sleuth 3.1.4 , the problem still exist.

sunset535 avatar Sep 28 '22 06:09 sunset535

We will need a reproducer, feign does work correctly and rabbit also works correctly. Maybe you have some special use case that we don't understand

marcingrzejszczak avatar Sep 28 '22 11:09 marcingrzejszczak

We will need a reproducer, feign does work correctly and rabbit also works correctly. Maybe you have some special use case that we don't understand

after debug tracing, i found the problem.

the normal request, the TraceContext is correct. image

the feign request by custom mq consumer method, the TraceContext is null. image

i dont know how to resolve it.

We will need a reproducer, feign does work correctly and rabbit also works correctly. Maybe you have some special use case that we don't understand

sunset535 avatar Oct 10 '22 06:10 sunset535