Describe the bug
The issue is on line 537 where mock_raw_span = MagicMock() is created without a spec parameter. When this mock is passed through the tracer's handle() method, it triggers unbounded creation of child MagicMock objects because:
- Every attribute access (span.get_data(), span.raw_span(), etc.) creates new MagicMock instances
- MagicMock stores all calls and arguments in memory for assertion tracking
- Without a spec, there are no boundaries preventing infinite mock object creation
- The handle() method makes numerous such calls (lines 352-421 in tracer.py)
To Reproduce
cd integrations/langfuse
hatch run test:unit tests/test_tracer.py::TestLangfuseTracer::test_create_new_span -v
Describe your environment (please complete the following information):