Skip to content

Commit d60648c

Browse files
committed
touch up afer merge conflict resolutions
1 parent 8995916 commit d60648c

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

ddtrace/_monkey.py

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,16 @@
88
from ddtrace.appsec import load_common_appsec_modules
99
from ddtrace.internal.telemetry.constants import TELEMETRY_NAMESPACE
1010
from ddtrace.settings.asm import config as asm_config
11+
from ddtrace.vendor.debtcollector import deprecate
1112

1213
from .internal import telemetry
1314
from .internal.logger import get_logger
1415
from .internal.utils import formats
16+
from .internal.utils.deprecations import DDTraceDeprecationWarning # noqa: E402
1517
from .settings import _global_config as config
1618

1719

1820
if TYPE_CHECKING: # pragma: no cover
19-
from typing import Any # noqa:F401
2021
from typing import Callable # noqa:F401
2122
from typing import List # noqa:F401
2223
from typing import Union # noqa:F401
@@ -211,6 +212,16 @@ def on_import(hook):
211212

212213

213214
def patch_all(**patch_modules):
215+
deprecate(
216+
"patch_all is deprecated and will be removed in a future version of the tracer.",
217+
message="""patch_all is deprecated in favor of ``import ddtrace.auto`` and ``DD_PATCH_MODULES``
218+
environment variable if needed.""",
219+
category=DDTraceDeprecationWarning,
220+
)
221+
_patch_all(**patch_modules)
222+
223+
224+
def _patch_all(**patch_modules):
214225
# type: (bool) -> None
215226
"""Enables ddtrace library instrumentation.
216227
@@ -221,7 +232,7 @@ def patch_all(**patch_modules):
221232
222233
:param dict patch_modules: Override whether particular modules are patched or not.
223234
224-
>>> patch_all(redis=False, cassandra=False)
235+
>>> _patch_all(redis=False, cassandra=False)
225236
"""
226237
modules = PATCH_MODULES.copy()
227238

0 commit comments

Comments
 (0)