Skip to content

Commit 38a7e70

Browse files
authored
chore(debugger): remove max probes cap (#15265)
## Description We remove the cap on the maximum number of DI probes that can be installed within a process at any given time. Refs: [DEBUG-4688](https://datadoghq.atlassian.net/browse/DEBUG-4688) [DEBUG-4688]: https://datadoghq.atlassian.net/browse/DEBUG-4688?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
1 parent 0724124 commit 38a7e70

File tree

4 files changed

+0
-29
lines changed

4 files changed

+0
-29
lines changed

ddtrace/debugging/_debugger.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -400,9 +400,6 @@ def _probe_injection_hook(self, module: ModuleType) -> None:
400400
def _inject_probes(self, probes: List[LineProbe]) -> None:
401401
for probe in probes:
402402
if probe not in self._probe_registry:
403-
if len(self._probe_registry) >= di_config.max_probes:
404-
log.warning("Too many active probes. Ignoring new ones.")
405-
return
406403
log.debug("[%s][P: %s] Received new %s.", os.getpid(), os.getppid(), probe)
407404
self._probe_registry.register(probe)
408405

@@ -529,10 +526,6 @@ def _probe_wrapping_hook(self, module: ModuleType) -> None:
529526

530527
def _wrap_functions(self, probes: List[FunctionProbe]) -> None:
531528
for probe in probes:
532-
if len(self._probe_registry) >= di_config.max_probes:
533-
log.warning("Too many active probes. Ignoring new ones.")
534-
return
535-
536529
self._probe_registry.register(probe)
537530
try:
538531
assert probe.module is not None # nosec

ddtrace/internal/settings/dynamic_instrumentation.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
from ddtrace.version import get_version
1212

1313

14-
DEFAULT_MAX_PROBES = 100
1514
DEFAULT_GLOBAL_RATE_LIMIT = 100.0
1615

1716

@@ -49,7 +48,6 @@ class DynamicInstrumentationConfig(DDConfig):
4948

5049
service_name = DDConfig.d(str, lambda _: ddconfig.service or get_application_name() or DEFAULT_SERVICE_NAME)
5150
_intake_url = DDConfig.d(str, lambda _: agent_config.trace_agent_url)
52-
max_probes = DDConfig.d(int, lambda _: DEFAULT_MAX_PROBES)
5351
global_rate_limit = DDConfig.d(float, lambda _: DEFAULT_GLOBAL_RATE_LIMIT)
5452
_tags_in_qs = DDConfig.d(bool, lambda _: True)
5553
tags = DDConfig.d(str, _derive_tags)

tests/debugging/exploration/debugger.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,6 @@ def on_snapshot(cls, snapshot: Snapshot) -> None:
198198

199199
@classmethod
200200
def enable(cls) -> None:
201-
di_config.max_probes = float("inf")
202201
di_config.global_rate_limit = float("inf")
203202
di_config.metrics = False
204203

tests/debugging/test_debugger.py

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -324,25 +324,6 @@ def test_debugger_decorated_method(stuff):
324324
)
325325

326326

327-
@mock.patch("ddtrace.debugging._debugger.log")
328-
def test_debugger_max_probes(mock_log):
329-
with debugger(max_probes=1) as d:
330-
d.add_probes(
331-
good_probe(),
332-
)
333-
assert len(d._probe_registry) == 1
334-
d.add_probes(
335-
create_snapshot_line_probe(
336-
probe_id="probe-decorated-method",
337-
source_file="tests/submod/stuff.py",
338-
line=48,
339-
condition=None,
340-
),
341-
)
342-
assert len(d._probe_registry) == 1
343-
mock_log.warning.assert_called_once_with("Too many active probes. Ignoring new ones.")
344-
345-
346327
def test_debugger_tracer_correlation(stuff):
347328
with debugger() as d:
348329
d.add_probes(

0 commit comments

Comments
 (0)