Spring Cloud Sleuth integration
Type: Feature
Is your feature request related to a problem? Please describe. As part of spring 2.2.x before this was moved to aws spring spring sleuth integration worked by default, this is no longer working and someone had raised it here but I cant seem to find the ticket here to get this integrated - https://github.com/spring-cloud/spring-cloud-sleuth/issues/1956
Describe the solution you'd like Integrate spring cloud sleuth so that tracing works by default
Describe alternatives you've considered NA
Additional context NA
Thanks for bringing it to our attention. Thats something definitely nice to add in 3.0.
Would it be better to instead integrate opentracing? It would support more tracing backends.
Sleuth under the hood integrates with OpenTelemetry (which is a opentracing successor) and few more tracing backends AFAIR, so actually staying compatible with Sleuth opens up doors for supporting even more backends.
For the moment while waiting for this to be released in version 3 where we are in need of a traceId which was originally supplied using sleuth (uses Brave underneath by default I believe) we are using the @NewSpan annotation. This is supplied by the current spring-cloud-sleuth-api library which generates the Span each time the listen() method is called as part of our SQS Listeners:
@SqsListener( value = ..., deletionPolicy = ...)
@NewSpan()
public void listen(@Payload String message) throws JsonProcessingException {
...
}
Works well so far with it registering with the SLF4J MDC so it's worth noting as a temporary solution.
Just as an FYI, Brave supports instrumentation of AWS SDK v1 and v2 out of the box https://github.com/openzipkin/zipkin-aws/tree/master/brave/instrumentation-aws-java-sdk-v2-core. You can use this until a higher level integration is supported by Spring.
Closed in favor of https://github.com/awspring/spring-cloud-aws/issues/566