0

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;
    };
}
Bassel Kh
  • 1,941
  • 1
  • 19
  • 30

1 Answers1

0

You seems to be doing this as the docs suggests, check out the Sleuth auto-configuration, it should be injected, it might happen that you are using an incompatible version of another module/project, e.g.: Spring Boot.

Also, we are about to release Sleuth 3.1.0, you are two major versions behind, this version is not supported anymore, so even if this is a bug, there won't be a new release from the 1.x line that could fix this.

Jonatan Ivanov
  • 4,895
  • 2
  • 15
  • 30