Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ddtrace/debugging/_probe/registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ def unregister(self, *probes: Probe) -> List[Probe]:

def get_pending(self, location: str) -> List[Probe]:
"""Get the currently pending probes by location."""
return self._pending[location]
return self._pending[location].copy()

def __contains__(self, probe: object) -> bool:
"""Check if a probe is in the registry."""
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
fixes:
- |
dynamic instrumentation: fix an issue that prevented multiple probes on the
same location from being instrumented.
3 changes: 3 additions & 0 deletions tests/debugging/test_debugger.py
Original file line number Diff line number Diff line change
Expand Up @@ -553,13 +553,16 @@ def test_debugger_multiple_function_probes_on_same_lazy_module():
for i in range(3)
]

sys.modules.pop("tests.submod.stuff", None)

with debugger() as d:
d.add_probes(*probes)

import tests.submod.stuff # noqa:F401

assert len(d._probe_registry) == len(probes)
assert all(_.error_type is None for _ in d._probe_registry.values())
assert len(d._probe_registry._pending) == 0


# DEV: The following tests are to ensure compatibility with the tracer
Expand Down
Loading