Skip to content

@NewSpan does not generate a new span Id for methods using Mono.subscriberContext #1030

@nnanda2016

Description

@nnanda2016

I am using:

  • Finchley.RELEASE release train
  • Spring boot 2.0.3

If I use Mono.subscriberContext() in a method and annotate the method with @NewSpan(name="myMethod"), no new span ID is generated for that method.

Reference Repo: https://github.com/nnanda2016/springboot-sleuth-issue

The method com.demo.springboot.sleuth.UserApiHandler#getById2 is the buggy one I am talking about. No new span Id is generated if I invoke this method (URL to invoke this: curl -v http://localhost:5002/users/ids/U1).

If I remove Mono.subscriberContext(), everything is working fine as expected. Example method in this sample app is com.demo.springboot.sleuth.UserApiHandler#getById (URL to invoke this: curl -v http://localhost:5002/users/U1).

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