[go: nahoru, domu]

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

Observation in ServerHttpObservationFilter is never stopped for asynchronous requests #32986

Closed
github-actions bot opened this issue Jun 7, 2024 · 1 comment
Assignees
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) theme: observability An issue related to observability and tracing type: backport An issue that is a backport of another issue to a maintenance branch type: bug A general bug
Milestone

Comments

@github-actions
Copy link
Contributor
github-actions bot commented Jun 7, 2024

Backport of gh-32730

@github-actions github-actions bot added in: web Issues in web modules (web, webmvc, webflux, websocket) theme: observability An issue related to observability and tracing type: backport An issue that is a backport of another issue to a maintenance branch type: bug A general bug labels Jun 7, 2024
@github-actions github-actions bot added this to the 6.0.22 milestone Jun 7, 2024
@bclozel bclozel self-assigned this Jun 7, 2024
bclozel added a commit that referenced this issue Jun 7, 2024
Prior to this commit, the `ServerHttpObservationFilter` would support
async dispatches and would do the following:

1. start the observation
2. call the filter chain
3. if async has started, do nothing
4. if not in async mode, stop the observation

This behavior would effectively rely on Async implementations to
complete and dispatch the request back to the container for an async
dispatch. This is what Spring web frameworks do and guarantee.

Some implementations complete the async request but do not dispatch
back; as a result, observations could leak as they are never stopped.

This commit changes the support of async requests. The filter now
opts-out of async dispatches - the filter will not be called for those
anymore. Instead, if the application started async mode during the
initial container dispatch, the filter will register an AsyncListener to
be notified of the outcome of the async handling.

Fixes gh-32986
Copy link
Contributor Author
github-actions bot commented Jun 7, 2024

Fixed via 76604db

@github-actions github-actions bot closed this as completed Jun 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) theme: observability An issue related to observability and tracing type: backport An issue that is a backport of another issue to a maintenance branch type: bug A general bug
Projects
None yet
Development

No branches or pull requests

1 participant