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

I have a question about Opentracing with Feign Client #151

Open
tnuren opened this issue May 10, 2024 · 0 comments
Open

I have a question about Opentracing with Feign Client #151

tnuren opened this issue May 10, 2024 · 0 comments

Comments

@tnuren
Copy link

tnuren commented May 10, 2024

I'm currently operating A and B services on Jaeger via Spring Cloud Gateway.

However, when A service calls B service using Feign Client, even though I registered the configuration in the Bean, the Jaeger UI does consider Feign Client calls as a single

Am I missing something?

@Bean
public static JaegerTracer getTracer() {
    io.jaegertracing.Configuration.SamplerConfiguration samplerConfig =
            io.jaegertracing.Configuration.SamplerConfiguration.fromEnv().withType("const").withParam(1);
    io.jaegertracing.Configuration.ReporterConfiguration reporterConfig =
            io.jaegertracing.Configuration.ReporterConfiguration.fromEnv().withLogSpans(true);
    io.jaegertracing.Configuration config = new io.jaegertracing.Configuration("vehicle").withSampler(samplerConfig).withReporter(reporterConfig);
    return config.getTracer();
}

@PostConstruct
public void setProperty() {
    System.setProperty("JAEGER_REPORTER_LOG_SPANS", "true");
}`

@Bean
public Client feignClient() {
    return new Client.Default(null, null);
}`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant