Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
mabdinur committed Jan 6, 2025
1 parent 81208cd commit 6f76469
Showing 1 changed file with 6 additions and 26 deletions.
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
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. Most datadog products and instrumentations can be enabled/disable via environment variables, see :ref:`configurations <Configuration>` page for more details.

Tracing
~~~~~~~

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

0 comments on commit 6f76469

Please sign in to comment.