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

Maintain the span from HTTP calls using feign clients with micrometer #1008

Open
fer1979 opened this issue Mar 25, 2024 · 1 comment
Open

Comments

@fer1979
Copy link

fer1979 commented Mar 25, 2024

Hi,

I am using spring boot 3.1.5. I migrated my code from sleuth to micrometer for tracing. I have it working logging traceId and spanId. But as somebody already asked here https://stackoverflow.com/questions/77044612/should-micrometer-generate-a-new-span-each-time-a-spring-boot-server-receives-a , I am trying to maintain the spanId when I call to other microservices through http using spring cloud open feign but it maintains only the traceId. I specify below the feign configuration I have:

@Configuration
public class FeignConfiguration {

    
    @Bean
    public Capability capability(final MeterRegistry registry) {
      return new MicrometerCapability(registry);
    }    
    
    @Bean
    public Logger.Level loggerLevel() {
        return Logger.Level.FULL;
    
    }
}

The logs enabled with loggerLevel method for feign clients are already logging with same traceId but different spanId. And of course when you call to other microservice, the spanId is different too. How to maintain the spanId in the feignClient and propagate it to other microservices as it worked with the old spring sleuth?. Thanks!!

@OlgaMaciaszek
Copy link
Collaborator

@jonatan-ivanov, could you take a look at this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants