Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception in instrumenting Spring Cloud Stream with Solace Binder #33

Open
hctsang96 opened this issue May 14, 2020 · 2 comments
Open

Comments

@hctsang96
Copy link

Hi all,

In my spring boot app, I used Spring Cloud Stream (with Solace binder), and tried to integrate with Open Tracing API implementation for Spring Cloud (which supports Spring Cloud Stream) but failed with the stack trace as below, probably due to incompatible data type (not supported by Solace SDTMap) of Open API info in message header.

My question is if I can DISABLE the instrumentation related to Spring Cloud Stream, such that I can have the transaction complete normally, and able to keep using OpenTracing API for most of instrumentation.

Any advice is welcome!
Thanks

[account-web-v1-7ff588d759-hbqqr account] 2020-05-13 09:21:06.610 ERROR 1 --- [ask-scheduler-6] o.s.integration.handler.LoggingHandler   : org.springframework.messaging.MessageHandlingException: error occurred in message handler [org.springframework.cloud.stream.binder.AbstractMessageChannelBinder$SendingHandler@31c62948]; nested exception is com.solace.spring.cloud.stream.binder.util.SolaceMessageConversionException: java.lang.IllegalArgumentException: Invalid type as value - ThreadLocalScope, failedMessage=GenericMessage [payload=byte[14], headers={messageSent=true, id=0ecc2e6c-6585-a781-00db-d613a97bb696, contentType=application/json, io.opentracing.contrib.spring.integration.messaging.OpenTracingChannelInterceptor.SCOPE=io.opentracing.util.ThreadLocalScope@72c13964, uber-trace-id=b69af8c09af7a43f:b69af8c09af7a43f:0:1, timestamp=1589361666604}]
@pavolloffay
Copy link
Contributor

The instrumentation is loaded by this auto configuration

.

Normally our auto instrumentation have a property that can be used to disable it, however, this does not have it. Then the auto-configuration can be disabled by excluding jar or via https://www.baeldung.com/spring-data-disable-auto-config#disable-using-annotation.

I am moving this to java-spring-messaging repository. Would you like to submit a PR to fix it?

@pavolloffay pavolloffay transferred this issue from opentracing-contrib/java-spring-cloud May 14, 2020
@MikeR13
Copy link

MikeR13 commented Aug 21, 2020

I am having the same problem, too. And asked this question on
https://stackoverflow.com/questions/63491625/opentracing-spring-cloud-stream-and-solace.
Is there a possibilty to keep the OpenTracingChannelInterceptor and the integration with solace?

Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants