Skip to content

I have a question about Opentracing with Feign Client #151

@tnuren

Description

@tnuren

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);
}`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions