Introduce option for high volume request tracking #1192
Closed
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.
Beyla tracks the full request completion time, this typically means we look to see if the application is responding with more data after the first HTTP response. One example would be a large file download, where the majority of the time is actually serializing the data on the wire. When the client uses keep-alive, we don't necessarily see the connection close event, but we tell by new pushed requests that we should terminate an earlier request.
This approach doesn't work well in when there's high volume of requests, e.g. beyond our current map sizing. The delayed requests will likely be booted out of the map before we have a chance to complete them. The ideal fix is to provide an option to resize the maps to match the volume of requests, but we need to finish the work of the tracer code restructuring for this to happen.
I'm adding an option to force Beyla to complete the request as soon as the response is finished. It will produce less accurate accounting for large file downlaods, but it will avoid no data for high volume of requests. We can also use this option to unblock clients if there are bugs in the delayed request accounting.
This PR is partial, since I accidentally pushed to main. Please review the following commits too:
7be9c33
and
bd3e5f4