You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
BatchLogRecordProcessor is not garbage collected, causing a memory leak
Steps to Reproduce
import gc
from opentelemetry.exporter.otlp.proto.grpc._log_exporter import OTLPLogExporter
from opentelemetry.sdk._logs.export import BatchLogRecordProcessor
for _ in range(10):
processor = BatchLogRecordProcessor(OTLPLogExporter("test"))
processor.shutdown()
del processor
gc.collect()
for obj in gc.get_objects():
if isinstance(obj, BatchLogRecordProcessor):
print(obj)
Expected Result
No BatchLogRecordProcessor objects should remain
Actual Result
One BatchLogRecordProcessor object is found for each instantiation and consumes ~240KiB of heap as measured by memray
Additional context
No response
Would you like to implement a fix?
None
The text was updated successfully, but these errors were encountered:
Describe your environment
OS: Debian 12 (Bookworm)
Python version: Python 3.11.2
SDK version: 1.30.0
API version: 1.30.0
What happened?
BatchLogRecordProcessor
is not garbage collected, causing a memory leakSteps to Reproduce
Expected Result
No
BatchLogRecordProcessor
objects should remainActual Result
One
BatchLogRecordProcessor
object is found for each instantiation and consumes ~240KiB of heap as measured by memrayAdditional context
No response
Would you like to implement a fix?
None
The text was updated successfully, but these errors were encountered: