-
Notifications
You must be signed in to change notification settings - Fork 3.1k
[exporter/tinybird] limit request size to 10mb #41989
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
[exporter/tinybird] limit request size to 10mb #41989
Conversation
62d8c4b
to
80357cd
Compare
type option func(*tinybirdExporter) error | ||
|
||
// withMaxRequestBodySize sets the maximum size of the request body in bytes. | ||
func withMaxRequestBodySize(size int) option { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems like isn't applied?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is only used in tests to verify that the request size limit works as expected, but it is not exposed to the user. The main reason for this is that the EventsAPI has a hard limit that has not changed for a long time, and it is not expected to change in the future.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
approved by codeowner - @dmitryax please take another look
Description
When a request to the EventsAPI exceeds 10 MB, split it into N smaller requests, each no larger than 10 MB.
If any of these requests fail, data processing stops and an at-most-once delivery approach is followed:
This change ensures that large requests (≥ 10 MB) do not result in complete data loss. Some data may still be lost because processing halts after the first failure, but this can be improved later by returning the missing data via
consumererror.Trace
and derivatives, allowing the collector to retry (out of the scope for this PR).Link to tracking issue
Fixes #41782
Testing
Tested were added to ensure that the at-most-once delivery approach is followed
Documentation