-
Notifications
You must be signed in to change notification settings - Fork 782
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
SQS Messaging Autoconfig #1218
SQS Messaging Autoconfig #1218
Conversation
@adriancole when you have a few minutes I'd appreciate feedback on the messaging model here. I'm not that familiar with it and our examples are not the most straightforward (rabbit/kafka) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have an alternate suggestion for SQS which will make the model look exact same as rabbit (which makes sense as both are remote brokers)
...springframework/cloud/sleuth/instrument/messaging/TraceSpringMessagingAutoConfiguration.java
Outdated
Show resolved
Hide resolved
...rg/springframework/cloud/sleuth/instrument/messaging/TracingMethodMessageHandlerAdapter.java
Outdated
Show resolved
Hide resolved
...rg/springframework/cloud/sleuth/instrument/messaging/TracingMethodMessageHandlerAdapter.java
Outdated
Show resolved
Hide resolved
...rg/springframework/cloud/sleuth/instrument/messaging/TracingMethodMessageHandlerAdapter.java
Outdated
Show resolved
Hide resolved
...rg/springframework/cloud/sleuth/instrument/messaging/TracingMethodMessageHandlerAdapter.java
Outdated
Show resolved
Hide resolved
...a/org/springframework/cloud/sleuth/instrument/messaging/TraceMessagingAutoConfiguration.java
Outdated
Show resolved
Hide resolved
@marcingrzejszczak I'm not sure why the test that is failing is failing. It's not in the stuff I modified so I am a bit lost. Maybe my test is not cleaning up after itself completely? Not sure |
@@ -82,6 +82,11 @@ | |||
<groupId>org.springframework.cloud</groupId> | |||
<artifactId>spring-cloud-commons</artifactId> | |||
</dependency> | |||
<dependency> | |||
<groupId>org.springframework.cloud</groupId> | |||
<artifactId>spring-cloud-aws-messaging</artifactId> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if I should bring in the starter of just the code?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Concrete dep is ok.
Flakey test 😭 |
@devinsba if you rebase against master, you'll see that this test is ignored :| It's been flakey for some time so I've decided not to run it (and the problem is gone ;) ) |
I was going to rebase to squash all the checkstyle commits anyway so will do |
Codecov Report
@@ Coverage Diff @@
## master #1218 +/- ##
============================================
- Coverage 69.39% 68.89% -0.51%
- Complexity 775 777 +2
============================================
Files 143 145 +2
Lines 3663 3716 +53
Branches 401 407 +6
============================================
+ Hits 2542 2560 +18
- Misses 889 924 +35
Partials 232 232
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #1218 +/- ##
===========================================
+ Coverage 58.07% 58.4% +0.32%
- Complexity 802 808 +6
===========================================
Files 151 153 +2
Lines 4308 4361 +53
Branches 469 475 +6
===========================================
+ Hits 2502 2547 +45
- Misses 1592 1596 +4
- Partials 214 218 +4
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor suggestions. Also I think that the docs are missing, right?
.../springframework/cloud/sleuth/instrument/messaging/ITTracingMethodMessageHandlerAdapter.java
Outdated
Show resolved
Hide resolved
...t/java/org/springframework/cloud/sleuth/instrument/messaging/SqsQueueMessageHandlerTest.java
Outdated
Show resolved
Hide resolved
...rg/springframework/cloud/sleuth/instrument/messaging/TracingMethodMessageHandlerAdapter.java
Show resolved
Hide resolved
Yup, no docs yet. Only got it to a point I was confident over the weekend |
Found a large bug, please don't merge |
So it turns out it was only a bug in my slightly different internal impl for spring 4 (not boot). @marcingrzejszczak, @adriancole, @shakuzen please review when you have time |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
data suggestions but even if not, looks good
...a/org/springframework/cloud/sleuth/instrument/messaging/TraceMessagingAutoConfiguration.java
Outdated
Show resolved
Hide resolved
...a/org/springframework/cloud/sleuth/instrument/messaging/TraceMessagingAutoConfiguration.java
Outdated
Show resolved
Hide resolved
private TraceContext.Extractor<MessageHeaderAccessor> extractor; | ||
|
||
|
||
TracingMethodMessageHandlerAdapter(Tracing tracing, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Having read through more of the messaging code I'm not sure how reusable this would need to be. It seems most other things will be covered by the existing spring-integration
style instrumentation. I'd love to get input from maybe someone who works on that project (spring-messaging
/spring-integration
) on whether maybe the SQS messaging is a special case
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking through the code I can find, this does seem to become useful for @MessageMapping
and @SubscribeMapping
which don't look to be covered by the current websockets instrumentation so I think it is useful to leave this here
Hey @devinsba, how is it going with this PR? Just FYI the build will be failing ATM due to issues with HATEOAS |
Hey @devinsba , I've fixed the merge conflicts. What do we do about this? :P |
Any updates about this PR? |
partially addressed #1217
Attempts to make spring-messaging generic component for use elsewhere
TracingMethodMessageHandlerAdapter
. I'm still thinking about how to abstract/wrap the existing classes so code doesn't have to me copied from the Impl on the other side