-
Notifications
You must be signed in to change notification settings - Fork 105
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
fix(otel_batch_processor): don't divide max_queue_size
by word-size
#635
fix(otel_batch_processor): don't divide max_queue_size
by word-size
#635
Conversation
I think that might actually be a bug in the code you linked as I think the intention is to limit memory consumption, not the number of spans. The rules around limits are focused around things that affect memory pressure. I think the info check should actually be this:
|
Hi @bryannaegele,
I'd be happy to fix it to use memory instead, but I think we also need to account for some pre allocated memory per table:
Basically, an empty table already occupies more words than the default max_queue_size: |
Wow, yea, this got all messed up... Hm, because spans have options for limits on attributes maybe we should just use the # of spans instead of size of the table? |
Codecov ReportAll modified and coverable lines are covered by tests ✅
📢 Thoughts on this report? Let us know!. |
What if we supported both? |
@bryannaegele , @tsloughter
For backward-compatibility with the previous config |
I've realized that A few SDKs in other languages that use it as a max queue length indeed: |
@tsloughter , @bryannaegele, |
I'm thinking we should go with this and can add a @bryannaegele does that sound good? |
Yep. I'm fine with length |
There is no need to convert `max_queue_size` to words, as it is compared with the number of objects in ETS table.
42b8376
to
22f3417
Compare
There is no need to convert
max_queue_size
to words, as it is compared with the number of objects in ETS table: https://github.com/open-telemetry/opentelemetry-erlang/blob/main/apps/opentelemetry/src/otel_batch_processor.erl#L278.