-
Notifications
You must be signed in to change notification settings - Fork 783
Misaligned spans exception when used with spring-data-mongodb-reactive and spring-cloud-stream #1770
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
Misaligned spans exception when used with spring-data-mongodb-reactive and spring-cloud-stream #1770
Comments
Same problem here with the same description, but with newest versions:
|
We're also experiencing this problem, it is preventing us from upgrading to spring boot 2.4.0. We're using: JDK 14
Stack trace:
|
Switching to spring-cloud-sleuth-otel solves the problem. |
Of course it does cause it doesn't instrument mongo. You can remain with |
@marcingrzejszczak Hehe ok, I didn't know that. But if so it makes sense :) Thanks for the pointer to the configuration property that allows us to disable it for mongodb. |
@magnus-larsson Thank you for the description, the sample project, and the tests. To me your test consistently passes after this change, I opened a PR in your repo so that you can see what changes I did on your project: magnus-larsson/ml-service-sleuth-issue#1 @vvalencia-cl @johanhaleby Could you please check what happens if you update to the latest versions (above)? |
@jonatan-ivanov Thanks for looking into this. But I have already tried with 2020.0.0-M6 and I get the same error (in my actual project). I'm using Maven though, with |
@johanhaleby I don't think the build system would make any difference (though I have seen "impossible" things happening before). But your project is definitely different, it could be another dependency issue (I'm suspicious). Could you please create a sample project that reproduces the issue that I can try debug and fix? What I have now is the sample project in the description which seems to be ok after upgrading the dependencies. |
If you check our documentation page - https://docs.spring.io/spring-cloud/docs/2020.0.0-M6/reference/html/ - you can see with which version of boot it was built ( BTW @johanhaleby since I have you here in Sleuth, can you check this issue in Rest Assured rest-assured/rest-assured#1341 ? :D |
I closed it cause I understand that the problem can't be reproduced? If there's anyone that thinks that's not the case please comment. |
@marcingrzejszczak Oh sure! It's good that you ping me. I'm overwhelmed by emails and notifications from the rest assured project and it's easy for me to miss things. I'll try to cherry-pick it tomorrow and hopefully also make a new release. In the future, feel free to email me directly if it's something important that's affecting the spring ecosystem that I need to fix (or if you just deem it important for other reasons) :) That goes for awaitility as well :). |
cc @snicoll , @wilkinsona - which version of RestAssured would it be best for Spring to have the fix. Just a reminder - we're talking about this issue in Spring (spring-projects/spring-framework#22788) that resulted in this fix for Rest Assured 4.3 (rest-assured/rest-assured#1341). Currently Spring uses 3.x so maybe a cherry pick to Rest Assured 3.x and 4.2 would be good? WDYT? |
I'm not maintaining 3.x anymore though :( Too much work for me, unfortunately. |
Would 4.2 be possible? Cause @wilkinsona said Boot could bump to 4.2. There's an issue with bumping to 4.3 due to Groovy AFAIR |
Hmm, I don't think it would be much different to support 4.2 or 3.x. It would probably mean that the same amount of extra work for me. But I'll see what I can do. I've never done something like this in the ~10-year history of rest assured :) |
Uh oh!
There was an error while loading. Please reload this page.
Versions used
Java: 1.8
Spring Boot: 2.4.0-M3
Spring Cloud: 2020.0.0-M4
Spring Cloud Sleuth: 3.0.0-M4
Description of the error
When Spring Cloud Sleuth is used together with Spring Data MongoDB Reactive and Spring Cloud Stream it throws
Misaligned spans
exceptions.This is demonstrated by the GitHub project:
[email protected]:magnus-larsson/ml-service-sleuth-issue.git
This project contains three tests:
createProductDirect
- creates a document in MongoDB using Spring Data MongoDB ReactiveusingStreamWithoutMongoDb
- tests Spring Cloud Stream without using MongoDBcreateProductUsingStream
- combines usage of Spring Cloud Stream and Spring Data MongoDB ReactiveTest 1 and 2 are ok, while test 3 throws an exception:
Instructions to reproduce the error
The build will fail and in the log output you can find:
To make the failing test run ok, one of the following changes can be made to
build.gradle
:spring-cloud-starter-sleuth
from the dependencies2.3.2.RELEASE
and Spring Cloud version toHoxton.SR6
The text was updated successfully, but these errors were encountered: