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

capture response where servlet code programmatically starts async dispatch #985

Merged
merged 1 commit into from
Apr 1, 2021
Merged

capture response where servlet code programmatically starts async dispatch #985

merged 1 commit into from
Apr 1, 2021

Conversation

noffke
Copy link
Contributor

@noffke noffke commented Mar 23, 2021

Description

The GraphQL servlet from https://github.com/graphql-java-kickstart/graphql-java-servlet programmatically starts an async request by calling startAsync on the HttpServletRequest. In this case, logbook misses the reply because the logbook filter checks request.isAsyncStarted() before logging. In order to fix this issue, an AsyncListener is being registered whenever startAsync is being called.

Regarding LogbookAsyncListener, would it make sense to also implement the other methods besides onComplete? If yes, how?

Motivation and Context

Fix for issue #954

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.

@whiskeysierra
Copy link
Collaborator

First off, thank you for your contribution! 📣

Regarding LogbookAsyncListener, would it make sense to also implement the other methods besides onComplete? If yes, how?

I can't really judge, tbh.

@whiskeysierra
Copy link
Collaborator

👍

@whiskeysierra whiskeysierra merged commit 8b63466 into zalando:main Apr 1, 2021
@whiskeysierra
Copy link
Collaborator

I released your fix as 2.6.2. Thanks a lot for your contribution! 🎉

@noffke noffke deleted the zalando-logbook-954 branch May 19, 2021 11:42
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.

2 participants