-
Notifications
You must be signed in to change notification settings - Fork 524
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
Simplify non-blocking request handling #9069
Comments
One of the motivations for doing this is to ensure that authorization and rate-limiting errors are returned to the client. When we fix that, we should make sure to update https://github.com/elastic/apm-server/blob/main/docs/api-events.asciidoc#endpoint |
@axw can you elaborate on this? Afaics authorization errors are also returned in the current What exactly would the user facing changes be with this simplification? Does it make sense to label the |
@simitt all of these model processors will be run in the background goroutine: apm-server/internal/beater/beater.go Lines 670 to 693 in bd0969d
That includes authorization. Authentication is still done synchronously, as that happens in HTTP middleware, prior to the processor/stream code being reached. There's also request-level rate limiting happening in middleware. The parts that will be happening asynchronously now are per-event authorization checks, and per-event rate limiting. They're still happening, it's just that any authorization error (which, in the case of Lambda, are highly unlikely) will only logged in the server and won't surface to the client. Similarly, rate limiting isn't likely to affect Lambda; it's only relevant when auth is disabled, which is usually only the case for RUM. None of the other processors are likely to fail.
IMO that's not necessary. If we already had support for |
async parameter for non-blocking request handling was removed in elastic/apm-data#197 This can be closed |
In #8979, we introduced a new
async
flag that can be set by clients to request asynchronous handling of their events. We should improve how we handle asynchronous requests by:ctx.Done()
.context.Context
indicating that the slow so the batch processor chain can distinguish between blocking and non-blocking requests.processor.ProcessBatch
in line and the handling of the batch can be an implementation detail.The text was updated successfully, but these errors were encountered: