I'm using Sleuth 1.3.X to add distributed tracing feature to a microservice, I'm trying to change the Span name, and I came across this Link
It says that the SpanReporter should inject the SpanAdjuster and allow span manipulation before the actual reporting is done.
How I can do that?
here is my SpanAdjuster
@Bean
SpanAdjuster mySpanAdjuster(){
return (SpanAdjuster) span -> {
if ("/rest/XYZ/message".equals(span.tags().get("http.path"))){
Span.builder().from(span).name("Rest API").build();
}
return span;
};
}