Skip to content

Commit

Permalink
touch up afer merge conflict resolutions
Browse files Browse the repository at this point in the history
  • Loading branch information
ZStriker19 committed Feb 3, 2025
1 parent 8995916 commit d60648c
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions ddtrace/_monkey.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,16 @@
from ddtrace.appsec import load_common_appsec_modules
from ddtrace.internal.telemetry.constants import TELEMETRY_NAMESPACE
from ddtrace.settings.asm import config as asm_config
from ddtrace.vendor.debtcollector import deprecate

from .internal import telemetry
from .internal.logger import get_logger
from .internal.utils import formats
from .internal.utils.deprecations import DDTraceDeprecationWarning # noqa: E402
from .settings import _global_config as config


if TYPE_CHECKING: # pragma: no cover
from typing import Any # noqa:F401
from typing import Callable # noqa:F401
from typing import List # noqa:F401
from typing import Union # noqa:F401
Expand Down Expand Up @@ -211,6 +212,16 @@ def on_import(hook):


def patch_all(**patch_modules):
deprecate(
"patch_all is deprecated and will be removed in a future version of the tracer.",
message="""patch_all is deprecated in favor of ``import ddtrace.auto`` and ``DD_PATCH_MODULES``
environment variable if needed.""",
category=DDTraceDeprecationWarning,
)
_patch_all(**patch_modules)


def _patch_all(**patch_modules):
# type: (bool) -> None
"""Enables ddtrace library instrumentation.
Expand All @@ -221,7 +232,7 @@ def patch_all(**patch_modules):
:param dict patch_modules: Override whether particular modules are patched or not.
>>> patch_all(redis=False, cassandra=False)
>>> _patch_all(redis=False, cassandra=False)
"""
modules = PATCH_MODULES.copy()

Expand Down

0 comments on commit d60648c

Please sign in to comment.