Skip to content

[Bug] Skywalking + SpringCloud Gateway + Hystrix; Can not do async finish for the span repeatedly #9645

Description

@sweat123

Search before asking

  • I had searched in the issues and found no similar feature requirement.

Description

The project will throw exception 'Can not do async finish for the span repeatedly' when the request is fallback by hystrix.
image

After some code debug, I find the method asyncFinish() will be invoked twice with the same span in DispatcherHandlerHandleMethodInterceptor.java due to hystrix fallback.

I have solved this in my way by adding flag in ServerWebExchange when the hystrix fallback occurred and create the span according to ServerWebExchange attribute flag. The test code is as follows:

image

I do not think is a good way to solve the problem. Is there a better way or can anyone give me some advice to solve this problem.

Use case

No response

Related issues

No response

Are you willing to submit a PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Activity

  1. locked and limited conversation to collaborators on Sep 20, 2022
  2. converted this issue into a discussion #9646 on Sep 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions