File tree Expand file tree Collapse file tree 1 file changed +3
-0
lines changed
opentelemetry-sdk/src/logs Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -337,6 +337,9 @@ type LogsData = Box<(LogRecord, InstrumentationScope)>;
337337// ```
338338// (max_queue_size + max_export_batch_size) * size of boxed (LogRecord + InstrumentationScope)
339339// ```
340+ // - The average size of a `LogRecord` is ~300 bytes ( assuming 4 attributes), and the `InstrumentationScope` is ~50 bytes assuming no attributes.
341+ // - For `max_queue_size = 2048` and `max_export_batch_size = 512`, the total memory usage is ~900 KB as below:
342+ // Calculation: `(2048 + 512) * (300 + 50) = 2560 * 350 = 896000 bytes = 896 KB`.
340343//
341344// 6. **Key Notes on Memory Behavior**:
342345// - Boxing a `LogRecord` and `InstrumentationScope` moves the record to the heap,
You can’t perform that action at this time.
0 commit comments