Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(tracing): remove patch_all from basic usage docs #11868

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
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
32 changes: 6 additions & 26 deletions docs/basic_usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,39 +3,19 @@
Basic Usage
===========

Tracing
~~~~~~~
Automatic Instrumentation
~~~~~~~~~~~~~~~~~~~~~~~~~

``ddtrace.auto``
----------------

To set up instrumentation within your application, call :ref:`import ddtrace.auto<ddtraceauto>` as early as possible
To enable full ddtrace support (library instrumentations, profiling, application security monitoring, dynamic instrumentation, etc.) call :ref:`import ddtrace.auto<ddtraceauto>` as early as possible
mabdinur marked this conversation as resolved.
Show resolved Hide resolved
in your application. This will only work if your application is not running under ``ddtrace-run``.

``patch_all``
-------------

For fine-grained control over instrumentation setup, use ``patch_all`` as early as possible
in the application::

from ddtrace import patch_all
patch_all()

To toggle instrumentation for a particular module::

from ddtrace import patch_all
patch_all(redis=False, cassandra=False)

By default all supported libraries will be instrumented when ``patch_all`` is
used.

**Note:** To ensure that the supported libraries are instrumented properly in
the application, they must be patched *prior* to being imported. So make sure
to call ``patch_all`` *before* importing libraries that are to be instrumented.

More information about ``patch_all`` is available in the :py:func:`patch_all<ddtrace.patch_all>` API
documentation.
Note: Some Datadog products and instrumentations are disabled by default. Products and instrumentations can be enabled/disable via environment variables, see :ref:`configurations <Configuration>` page for more details.

Tracing
~~~~~~~

Manual Instrumentation
----------------------
Expand Down
Loading