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

@NewSpan on interface doesn't start new span #201

Open
joellp opened this issue Nov 8, 2022 · 0 comments
Open

@NewSpan on interface doesn't start new span #201

joellp opened this issue Nov 8, 2022 · 0 comments

Comments

@joellp
Copy link

joellp commented Nov 8, 2022

Expected Behavior

When I add a @NewSpan annotation on a method of an interface, then I will expect the implementation class to start a new span if that method is called.

Actual Behaviour

The implementation class method does not start a new span when called. It does work if I place the annotation on the method of the implentation class directly.

Steps To Reproduce

  1. Create an interface (Interface A) with a method annotated with @NewSpan.
  2. Create a class (Class A) and implement the interface. Annotate the class with @singleton.
  3. Create another class (Class B) with a method which is annotated with @NewSpan. Annotate the class with @singleton.
  4. Start the application and let it inject Interface A and Class B.
  5. Call the methods.
  6. The call to Interface A does not start a new span. The call to Class B does start a new span.
  7. Downgrade micronaut-tracing-zipkin and micronaut-tracing-core to 4.1.1. Now both calls create new spans.

Environment Information

  • Windows 10
  • Java 17

Example Application

https://github.com/joellp/micronaut-tracing-issue

Version

3.7.3

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