-
-
Notifications
You must be signed in to change notification settings - Fork 303
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
Add support for Micrometer's Observation API for the SQS pipeline #1164
base: main
Are you sure you want to change the base?
Conversation
Hi @sondemar, on a first glance this looks great! I wonder if it'd also make sense to add Observability support to SqsTemplate? Or perhaps leave it to a separate issue / PR? Let me know your thoughts, thanks! |
Hi @tomazfernandes , I have also thought about templates (SqsTemplate and SnsTemplate as well). It makes sense to include them because we might want to propagate the tracing context while sending messages to SQS/SNS or receiving messages from SQS (SqsTemplate). Initially, I considered including support for SQS/SNS templates in a separate ticket, but including SqsTemplate with this ticket is also fine. |
Makes sense, always a good idea to break into smaller PRs. In this case, TBH I'm not super familiar with Micrometer 2, so it'd be helpful to have a PR open for |
Another point here is - the most challenging part of instrumenting observation for this project is that it has many points where thread hopping may occur. The main reason is it supports any combination of Blocking and Non-blocking components such as Interceptors, Message Listener and Error Handlers. So I believe ideally we would have an Integration Test such as e.g.:
As a user I would expect to have Observability context in all these points, regardless of async / sync components. Of course, we could start supporting only let's say the message listener, but then we'd need to make it clear in the docs what are the limitations. Makes sense? Please let me know your thoughts. Thanks! |
I have already started the implementation of observability support for SqsTemplate (in the same PR), but now I am waiting for feedback on the following questions: micrometer-metrics/context-propagation#262 and micrometer-metrics/tracing#765. Regarding the scenarios for the integration test, it makes sense, and I will apply them. |
Hello @sondemar, just to catch up on this
I see you're still looking into this, anything else we could do on this end? Thanks! |
Hi @tomazfernandes ! I have found a solution for the issues I encountered. I am currently completing the integration tests proposed in this comment. I expect to have the full functionality ready by next week. Thank you for your patience! |
4178cf9
to
804f8cb
Compare
Hi @tomazfernandes , I have just pushed the following changes:
|
804f8cb
to
bcd72bb
Compare
bcd72bb
to
e689285
Compare
Hello @tomazfernandes, can I do anything to help make the review easier? |
I have just one question. This will send the trace when we send sns messages and we have SQS subscribing the SNS? |
Hi @AnakinPt , According to this comment, the
|
📢 Type of change
📜 Description
Added Micrometer's Observability support instruments SQS processing out of the box, while additionally propagating the inbound tracing information by looking it up in MessageHeaders.
Closes #646
💡 Motivation and Context
💚 How did you test it?
📝 Checklist
🔮 Next steps