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

Tracing context lost in actions/guards #1162

Open
mrodal opened this issue Sep 10, 2024 · 0 comments · May be fixed by #1164
Open

Tracing context lost in actions/guards #1162

mrodal opened this issue Sep 10, 2024 · 0 comments · May be fixed by #1164
Labels
status/need-triage Team needs to triage and take a first look

Comments

@mrodal
Copy link

mrodal commented Sep 10, 2024

The tracing context is being lost when executing triggers in ReactiveStateMachineExecutor
I've uploaded a simple example project with this configuration:
https://github.com/mrodal/issue-context-propagation/blob/master/src/main/java/issues/context_propagation/Controller.java

As you can see the tracing is missing when inside the action:

image

Debugging I managed to find the part where it is getting lost, in this flatMap:

triggerFlux = triggerSink.asFlux().flatMap(trigger -> handleTrigger(trigger), 1);

The example project has a controller with 2 endpoints

  • /event which triggers the state machine
  • /simple which executes a simplified code that reproduces the issue

The issue only happens when using Hooks.enableAutomaticContextPropagation() which we need to keep tracing in other parts of the code. I've reported the issue to the reactor team and you can see their response here: reactor/reactor-core#3887

Related issues:
micrometer-metrics/tracing#359
reactor/reactor-core#3887

@github-actions github-actions bot added the status/need-triage Team needs to triage and take a first look label Sep 10, 2024
mrodal added a commit to mrodal/spring-statemachine that referenced this issue Sep 10, 2024
@mrodal mrodal linked a pull request Sep 10, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status/need-triage Team needs to triage and take a first look
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant