-
Notifications
You must be signed in to change notification settings - Fork 210
Closed
Labels
P2bugSomething isn't workingSomething isn't workingcontributions wanted!Looking for external contributionsLooking for external contributionsintegration:langfuse
Description
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 -vDescribe your environment (please complete the following information):
- OS: Universal Dev Container
- Integration version: Commit 4ed2936
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
P2bugSomething isn't workingSomething isn't workingcontributions wanted!Looking for external contributionsLooking for external contributionsintegration:langfuse
Type
Projects
Status
Todo