Skip to content

Span finishes before webclient completes #135

@winster

Description

@winster

Please take a look at https://github.com/winster/jaeger-trace-reactive

This is a spring boot application with opentracing. As per the doc, java-spring-cloud supports webflux and webclient. But the trace is finished before the reactive flow is completed when there is a webclient call.

Initial analysis shows that following method are invoked everytime webclient makes http request.

TracingExchangeFilterFunction::filter
TracingClientResponseMono::subscribe
TracingClientResponseSubscriber::onSubscribe

Also noted that SpanLogsAppender::append is called for every log with the same spanId.

It is observed that JaegerSpan::finish is called before missing logs are appended. But span is still not null.

I tried removing, @Async annotation in service method for which Jaeger shows only POST trace.

Is there a way to get the complete reactive flow in the trace?

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