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

Micrometer Observations integration for SQS/SNS by default #566

Closed
sondemar opened this issue Dec 6, 2022 · 4 comments
Closed

Micrometer Observations integration for SQS/SNS by default #566

sondemar opened this issue Dec 6, 2022 · 4 comments
Labels
component: sns SNS integration related issue component: sqs SQS integration related issue

Comments

@sondemar
Copy link
Contributor

sondemar commented Dec 6, 2022

Type: Feature

Is your feature request related to a problem? Please describe.
With a new version of Spring Boot 3.x tracing propagation by Sleuth integration is replaced with Micrometer integration and with the newest version Spring Cloud Sleuth does not support AWS (SQS) integration anymore.

Describe the solution you'd like
Integrate Spring Cloud AWS with Micrometer tracing so that tracing propagation works by default for SQS/SNS integration. The tracing SQS message headers get extracted from the message and a trace gets put into the context or tracing context is put into tracing headers for pushed SNS message by default

Describe alternatives you've considered
As an alternative it could be porting the functionality from the Spring Cloud Sleuth project.

Additional context
Please let me know if you need a contribution to the implementation.

@tomazfernandes
Copy link
Contributor

Hi @sondemar, thanks for bringing this up.

We haven't really started looking into Micrometer integration, but it's definitely something worth having.

The main challenge I see for this is that the 3.0.0 version code has been completely rewritten, and it's now all async using CompletableFuture instances.

I'm not sure how Micrometer works, but if it relies on a similar mechanism as Log4J's MDC, with ThreadLocals, this might not be so simple due to the multithreaded nature of the solution.

What do you think?

Thanks

@maciejwalkowiak
Copy link
Contributor

I think it should be possible as the Micrometer Tracing works also with reactive APIs.

@maciejwalkowiak maciejwalkowiak added this to the 3.1 milestone Dec 7, 2022
@sondemar
Copy link
Contributor Author

sondemar commented Dec 7, 2022

Hi @tomazfernandes. following the comment http://disq.us/p/2rko9pj from @marcingrzejszczak and documentation about ctx propagation https://micrometer.io/docs/contextPropagation what I understand is it will not work out of the box and there should be created a custom "context" mechanism to manage ContextSnapshot to interact with Thread values.

@maciejwalkowiak
Copy link
Contributor

Closed in favor of #646

@maciejwalkowiak maciejwalkowiak closed this as not planned Won't fix, can't repro, duplicate, stale Apr 20, 2023
@maciejwalkowiak maciejwalkowiak removed this from the 3.1 milestone Nov 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: sns SNS integration related issue component: sqs SQS integration related issue
Projects
None yet
Development

No branches or pull requests

3 participants