I am using Spring Cloud Sleuth to create traces.
I am exposing a REST endpoint using Spring Boot like this:
@SpanName("calculate-reviews")
@GetMapping(path = "/reviews/{productId}")
public Reviews bookReviewsById(@PathVariable String productId) {
...
}
My expectation would be that the span that is created by Spring Cloud Sleuth is named calculate-reviews
, however, that's not the case. Instead the default span name is generated which looks like this: get /reviews/{productId}
Is there a chance to change the span name for a REST endpoint at all? How would I achieve this?