Skip to content

Conversation

laurit
Copy link
Contributor

@laurit laurit commented Mar 11, 2025

Hopefully resolves #13455
Keep async request handling state in context instead of using request attributes to avoid user application getting confused by these attributes.

@laurit laurit marked this pull request as ready for review March 18, 2025 13:31
@laurit laurit requested a review from a team as a code owner March 18, 2025 13:31

private void attachAsyncListener(ServletRequestContext<REQUEST> requestContext) {
REQUEST request = requestContext.request();
Context context = getServerContext(request);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Existing code was wrong here, we don't add context as request attribute on all servers so getServerContext returns null there.

@laurit
Copy link
Contributor Author

laurit commented Mar 18, 2025

@123liuziming could you verify whether this helps in your case

@123liuziming
Copy link
Contributor

@123liuziming could you verify whether this helps in your case

It works, thanks!

@laurit laurit added this to the v2.15.0 milestone Apr 8, 2025
@trask trask merged commit 940bce8 into open-telemetry:main Apr 9, 2025
86 checks passed
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

Successfully merging this pull request may close these issues.

Make the extra field inserted by virtualfield a transient field

3 participants