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

Baggage is empty when transferring to service/command layer using Mono just or Mono from callable #4761

Open
kusandriadi opened this issue Feb 20, 2024 · 2 comments
Labels
waiting for feedback We need additional information before we can continue

Comments

@kusandriadi
Copy link

kusandriadi commented Feb 20, 2024

Describe the bug
I set baggage in controller and sent to service/command layer, but the baggage is empty, the strange thing is Trace ID and Span ID were transfer successfully.
I create mini app here if you want to check: https://github.com/kusandriadi/micrometer-mini-app

Environment

  • Java 21
  • Spring Boot 3.2.2
  • Micrometer tracing bom 1.2.3
  • Spring doc 2.3.0

To Reproduce
I created three difference implementation:

The implementations above already cover in unit test:
https://github.com/kusandriadi/micrometer-mini-app/blob/main/src/test/java/com/micrometer/web/HelloControllerTest.java

How to reproduce the bug:

  • Run the unit test.

Expected behavior
All case in unit test must be success

Additional context

  • I already set Hooks.enableAutomaticContextPropagation(). Trace id and span id were not empty, only baggage is empty when using Mono fromCallable or Mono just.
  • in my project, we are using command pattern.
@marcingrzejszczak
Copy link
Contributor

cc @chemicL

@marcingrzejszczak
Copy link
Contributor

Have you tried working with ReactorBaggage and BaggageToPropagate ? Check the docs here.

@marcingrzejszczak marcingrzejszczak added waiting for feedback We need additional information before we can continue and removed waiting-for-triage labels May 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
waiting for feedback We need additional information before we can continue
Projects
None yet
Development

No branches or pull requests

2 participants