-
Notifications
You must be signed in to change notification settings - Fork 116
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
Revert "Monitor serving of Rack response bodies" #1052
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Hi @unflxw, We've found some issues with your Pull Request.
|
This is a message from the daily scheduled checks. |
tombruijn
added a commit
that referenced
this pull request
Jul 2, 2024
Instrument what happens when a Rack response body is read and closed. We instrument these events by wrapping the response body in the appropriate response body BodyWrapper subclass, depending on the response object type. This change was previously sent in as PR #1037 and reverted in #1052. We saw issues with multiple requests reported in the same transaction. This problem occurred when there was an error in the middleware stack, and the BodyWrapper never closed the response body. I've removed any transaction complete logic from the BodyWrapper in the original PR. We now have a Rack EventHandler that ensures the transaction is always closed per request, even when such an error scenario occurs again. The only scenario in which we don't support this response body instrumentation is when no EventHandler is present in the middleware stack. This level of support is acceptable to me. We want people to use the EventHandler. Most of our automatic instrumentations are updated to add it to the middleware stack. From the original commit: 7da96e7 > Some work might be getting done within a Rack response body. For > example, when ActionController::Streaming is used, or when a Rack app > elects to stream a response. > > The Rack SPEC doc defines the behavior in sufficient detail to wrap > this into the current AppSignal transaction. > > Sadly, there is some work involved in supporting all the right > methods, so just "one-size-fits-all" wrapper will not quite work. Co-authored-by: Julik Tarkhanov <me@julik.nl>
tombruijn
added a commit
that referenced
this pull request
Jul 2, 2024
Instrument what happens when a Rack response body is read and closed. We instrument these events by wrapping the response body in the appropriate response body BodyWrapper subclass, depending on the response object type. This change was previously sent in as PR #1037 and reverted in #1052. We saw issues with multiple requests reported in the same transaction. This problem occurred when there was an error in the middleware stack, and the BodyWrapper never closed the response body. I've removed any transaction complete logic from the BodyWrapper in the original PR. We now have a Rack EventHandler that ensures the transaction is always closed per request, even when such an error scenario occurs again. The only scenario in which we don't support this response body instrumentation is when no EventHandler is present in the middleware stack. This level of support is acceptable to me. We want people to use the EventHandler. Most of our automatic instrumentations are updated to add it to the middleware stack. From the original commit: 7da96e7 > Some work might be getting done within a Rack response body. For > example, when ActionController::Streaming is used, or when a Rack app > elects to stream a response. > > The Rack SPEC doc defines the behavior in sufficient detail to wrap > this into the current AppSignal transaction. > > Sadly, there is some work involved in supporting all the right > methods, so just "one-size-fits-all" wrapper will not quite work. Co-authored-by: Julik Tarkhanov <me@julik.nl>
tombruijn
added a commit
that referenced
this pull request
Jul 2, 2024
Instrument what happens when a Rack response body is read and closed. We instrument these events by wrapping the response body in the appropriate response body BodyWrapper subclass, depending on the response object type. This change was previously sent in as PR #1037 and reverted in #1052. We saw issues with multiple requests reported in the same transaction. This problem occurred when there was an error in the middleware stack, and the BodyWrapper never closed the response body. I've removed any transaction complete logic from the BodyWrapper in the original PR. We now have a Rack EventHandler that ensures the transaction is always closed per request, even when such an error scenario occurs again. The only scenario in which we don't support this response body instrumentation is when no EventHandler is present in the middleware stack. This level of support is acceptable to me. We want people to use the EventHandler. Most of our automatic instrumentations are updated to add it to the middleware stack. From the original commit: 7da96e7 > Some work might be getting done within a Rack response body. For > example, when ActionController::Streaming is used, or when a Rack app > elects to stream a response. > > The Rack SPEC doc defines the behavior in sufficient detail to wrap > this into the current AppSignal transaction. > > Sadly, there is some work involved in supporting all the right > methods, so just "one-size-fits-all" wrapper will not quite work. Part of #1099 Co-authored-by: Julik Tarkhanov <me@julik.nl>
tombruijn
added a commit
that referenced
this pull request
Jul 8, 2024
Instrument what happens when a Rack response body is read and closed. We instrument these events by wrapping the response body in the appropriate response body BodyWrapper subclass, depending on the response object type. This change was previously sent in as PR #1037 and reverted in #1052. We saw issues with multiple requests reported in the same transaction. This problem occurred when there was an error in the middleware stack, and the BodyWrapper never closed the response body. I've removed any transaction complete logic from the BodyWrapper in the original PR. We now have a Rack EventHandler that ensures the transaction is always closed per request, even when such an error scenario occurs again. The only scenario in which we don't support this response body instrumentation is when no EventHandler is present in the middleware stack. This level of support is acceptable to me. We want people to use the EventHandler. Most of our automatic instrumentations are updated to add it to the middleware stack. From the original commit: 7da96e7 > Some work might be getting done within a Rack response body. For > example, when ActionController::Streaming is used, or when a Rack app > elects to stream a response. > > The Rack SPEC doc defines the behavior in sufficient detail to wrap > this into the current AppSignal transaction. > > Sadly, there is some work involved in supporting all the right > methods, so just "one-size-fits-all" wrapper will not quite work. Part of #1099 Co-authored-by: Julik Tarkhanov <me@julik.nl>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Reverts #1037 (/cc @julik @tombruijn)
This relates to several issues we've encountered in support: