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

Automatic context propagation stops working after an error occurrs #3360

Closed
surmabck opened this issue Feb 21, 2023 · 1 comment
Closed

Automatic context propagation stops working after an error occurrs #3360

surmabck opened this issue Feb 21, 2023 · 1 comment
Assignees
Labels
for/other-project This issue belongs to another project

Comments

@surmabck
Copy link

surmabck commented Feb 21, 2023

Expected Behavior

I believe WebFilters should have auto context propagation regardless if error occurred or not.

Actual Behavior

Automatic context propagation enabled via Hooks.enableAutomaticContextPropagation(); stops working when error was being handled in WebFilter. Once error is caught, all further WebFilters are going to be stripped of MDC context.

Reproductor

I've prepared reproducer here -> https://github.com/surmabck/spring-boot-3xx-micrometer-issues/tree/only-reactor

@reactorbot reactorbot added the ❓need-triage This issue needs triage, hasn't been looked at by a team member yet label Feb 21, 2023
@chemicL chemicL self-assigned this Feb 22, 2023
@chemicL chemicL added for/other-project This issue belongs to another project and removed ❓need-triage This issue needs triage, hasn't been looked at by a team member yet labels Feb 22, 2023
@chemicL
Copy link
Member

chemicL commented Feb 22, 2023

Thanks @surmabck for the report with a reproducer.

I ran the example and here's what I observed:

If I make a request to /failing but afterwards make a request to /helloWorld then the tracing information is present in the /helloWorld handling.

My understanding is that the Observation is not attached to the reactive chain following a trigger of your WebExceptionHandler. Please report it against spring-framework.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
for/other-project This issue belongs to another project
Projects
None yet
Development

No branches or pull requests

3 participants