diff --git a/source/includes/log-changes-to-database-profiler.rst b/source/includes/log-changes-to-database-profiler.rst new file mode 100644 index 00000000000..90226c2f0ee --- /dev/null +++ b/source/includes/log-changes-to-database-profiler.rst @@ -0,0 +1,5 @@ +Starting in MongoDB 4.0.22, changes made to the :ref:`database profiler +` profile level, ``slowms``, or ``sampleRate`` +using the :dbcommand:`profile` command or +:method:`db.setProfilingLevel()` wrapper method are recorded in the +:option:`log file `. \ No newline at end of file diff --git a/source/reference/command/profile.txt b/source/reference/command/profile.txt index 2480f8a55ca..a0de0bb6cd0 100644 --- a/source/reference/command/profile.txt +++ b/source/reference/command/profile.txt @@ -15,7 +15,7 @@ Definition .. dbcommand:: profile - .. versionchanged:: 4.0 + .. versionchanged:: 4.0.22 The command can be run on :binary:`~bin.mongos` with ``profile`` level: @@ -42,6 +42,8 @@ Definition .. include:: /includes/warning-profiler-performance.rst + .. include:: /includes/log-changes-to-database-profiler.rst + The :dbcommand:`profile` command has the following syntax: .. code-block:: javascript diff --git a/source/reference/method/db.setProfilingLevel.txt b/source/reference/method/db.setProfilingLevel.txt index 52bfbddb1bc..7eea587b942 100644 --- a/source/reference/method/db.setProfilingLevel.txt +++ b/source/reference/method/db.setProfilingLevel.txt @@ -23,7 +23,7 @@ Definition `. If the :ref:`database profiler level ` is - ``1`` or ``2`` (i.e. the :doc:`database profiler + ``1`` or ``2`` (specifically, the :doc:`database profiler ` is enabled), the :ref:`slowms ` and the :ref:`sampleRate ` affect @@ -31,7 +31,7 @@ Definition `. If the :ref:`database profiler level ` is - ``0`` (i.e. :doc:`database profiler + ``0`` (specifically, :doc:`database profiler ` is disabled), the :ref:`slowms ` and the :ref:`sampleRate ` affect @@ -48,6 +48,8 @@ Definition :method:`db.setProfilingLevel()` provides a wrapper around the :dbcommand:`profile` command. + .. include:: /includes/log-changes-to-database-profiler.rst + Syntax ~~~~~~ @@ -83,7 +85,7 @@ Parameters .. include:: /includes/database-profiler-levels.rst - Since profiling is not available on :binary:`~bin.mongos`, + Because profiling is not available on :binary:`~bin.mongos`, :method:`db.setProfilingLevel()` cannot be used to set the profiling level to a value other than ``0`` on a :binary:`~bin.mongos` instance. @@ -114,9 +116,9 @@ Parameters For :binary:`~bin.mongod` instances, the setting affects both the diagnostic log and, if enabled, the profiler. - For :binary:`~bin.mongos` instances, the setting affects the - diagnostic log only and not the profiler since profiling is not - available on :binary:`~bin.mongos`. + For :binary:`~bin.mongos` instances, the setting affects + the diagnostic log only and not the profiler because + profiling is not available on :binary:`~bin.mongos`. .. note:: This argument affects the same setting as the configuration @@ -135,9 +137,9 @@ Parameters For :binary:`~bin.mongod` instances, the setting affects both the diagnostic log and, if enabled, the profiler. - For :binary:`~bin.mongos` instances, the setting affects the - diagnostic log only and not the profiler since profiling is not - available on :binary:`~bin.mongos`. + For :binary:`~bin.mongos` instances, the setting affects + the diagnostic log only and not the profiler because + profiling is not available on :binary:`~bin.mongos`. .. note:: This argument affects the same setting as the configuration option diff --git a/source/tutorial/manage-the-database-profiler.txt b/source/tutorial/manage-the-database-profiler.txt index cb3ebe04331..48bb2213d99 100644 --- a/source/tutorial/manage-the-database-profiler.txt +++ b/source/tutorial/manage-the-database-profiler.txt @@ -31,8 +31,7 @@ When enabled, profiling has an effect on database performance and disk use. See :ref:`Database Profiler Overhead` for more information. This document outlines a number of key administration options for the -database profiler. For additional related information, consider the -following resources: +database profiler. For additional related information, see: - :doc:`/reference/database-profiler` - :doc:`Profile Command ` @@ -86,6 +85,8 @@ The ``"ok" : 1`` key-value pair indicates the operation succeeded: To verify the new setting, see the :ref:`database-profiling-view-status` section. +.. include:: /includes/log-changes-to-database-profiler.rst + .. _database-profiling-specify-slowms-threshold: Specify the Threshold for Slow Operations