Skip to content

Commit 58bf04d

Browse files
jason-price-mongodbandf-mongodb
authored andcommitted
DOCS-13884 Log profiler changes
1 parent 590d4ea commit 58bf04d

File tree

4 files changed

+23
-13
lines changed

4 files changed

+23
-13
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Starting in MongoDB 4.2.12 (also available starting in 4.0.22), changes
2+
made to the :ref:`database profiler <database-profiler>` ``level``,
3+
``slowms``, or ``sampleRate`` using the :dbcommand:`profile` command or
4+
:method:`db.setProfilingLevel()` wrapper method are recorded in the
5+
:option:`log file <mongod --logpath>`.

source/reference/command/profile.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Definition
1515

1616
.. dbcommand:: profile
1717

18-
.. versionchanged:: 4.0
18+
.. versionchanged:: 4.2.12
1919

2020
The command can be run on :binary:`~bin.mongos` with ``profile``
2121
level:
@@ -42,6 +42,8 @@ Definition
4242

4343
.. include:: /includes/warning-profiler-performance.rst
4444

45+
.. include:: /includes/log-changes-to-database-profiler.rst
46+
4547
The :dbcommand:`profile` command has the following syntax:
4648

4749
.. code-block:: javascript

source/reference/method/db.setProfilingLevel.txt

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,15 @@ Definition
2323
<set-profiling-level-options-sampleRate>`.
2424

2525
If the :ref:`database profiler level <set-profiling-level-level>` is
26-
``1`` or ``2`` (i.e. the :doc:`database profiler
26+
``1`` or ``2`` (specifically, the :doc:`database profiler
2727
</tutorial/manage-the-database-profiler/>` is enabled), the
2828
:ref:`slowms <set-profiling-level-options-slowms>` and the
2929
:ref:`sampleRate <set-profiling-level-options-sampleRate>` affect
3030
the behavior of both the profiler and the :option:`diagnostic log
3131
<mongod --logpath>`.
3232

3333
If the :ref:`database profiler level <set-profiling-level-level>` is
34-
``0`` (i.e. :doc:`database profiler
34+
``0`` (specifically, :doc:`database profiler
3535
</tutorial/manage-the-database-profiler/>` is disabled), the
3636
:ref:`slowms <set-profiling-level-options-slowms>` and the
3737
:ref:`sampleRate <set-profiling-level-options-sampleRate>` affect
@@ -48,6 +48,8 @@ Definition
4848
:method:`db.setProfilingLevel()` provides a wrapper around the
4949
:dbcommand:`profile` command.
5050

51+
.. include:: /includes/log-changes-to-database-profiler.rst
52+
5153
Syntax
5254
~~~~~~
5355

@@ -83,7 +85,7 @@ Parameters
8385

8486
.. include:: /includes/database-profiler-levels.rst
8587

86-
Since profiling is not available on :binary:`~bin.mongos`,
88+
Because profiling is not available on :binary:`~bin.mongos`,
8789
:method:`db.setProfilingLevel()` cannot be used to set the profiling
8890
level to a value other than ``0`` on a :binary:`~bin.mongos` instance.
8991

@@ -114,9 +116,9 @@ Parameters
114116
For :binary:`~bin.mongod` instances, the setting affects both the
115117
diagnostic log and, if enabled, the profiler.
116118

117-
For :binary:`~bin.mongos` instances, the setting affects the
118-
diagnostic log only and not the profiler since profiling is not
119-
available on :binary:`~bin.mongos`.
119+
For :binary:`~bin.mongos` instances, the setting affects
120+
the diagnostic log only and not the profiler because
121+
profiling is not available on :binary:`~bin.mongos`.
120122

121123
.. note::
122124
This argument affects the same setting as the configuration
@@ -135,9 +137,9 @@ Parameters
135137
For :binary:`~bin.mongod` instances, the setting affects both the
136138
diagnostic log and, if enabled, the profiler.
137139

138-
For :binary:`~bin.mongos` instances, the setting affects the
139-
diagnostic log only and not the profiler since profiling is not
140-
available on :binary:`~bin.mongos`.
140+
For :binary:`~bin.mongos` instances, the setting affects
141+
the diagnostic log only and not the profiler because
142+
profiling is not available on :binary:`~bin.mongos`.
141143

142144
.. note::
143145
This argument affects the same setting as the configuration option

source/tutorial/manage-the-database-profiler.txt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,7 @@ When enabled, profiling has an effect on database performance and
3131
disk use. See :ref:`Database Profiler Overhead<database-profiling-overhead>` for more information.
3232

3333
This document outlines a number of key administration options for the
34-
database profiler. For additional related information, consider the
35-
following resources:
34+
database profiler. For additional related information, see:
3635

3736
- :doc:`/reference/database-profiler`
3837
- :doc:`Profile Command </reference/command/profile>`
@@ -53,7 +52,7 @@ The following profiling levels are available:
5352
Enable and Configure Database Profiling
5453
---------------------------------------
5554

56-
You can enable database profiling for :binary:`~bin.mongod` instances .
55+
You can enable database profiling for :binary:`~bin.mongod` instances.
5756

5857
This section uses the :binary:`~bin.mongo` shell helper
5958
:method:`db.setProfilingLevel()` helper to enable profiling. For
@@ -86,6 +85,8 @@ The ``"ok" : 1`` key-value pair indicates the operation succeeded:
8685
To verify the new setting, see the
8786
:ref:`database-profiling-view-status` section.
8887

88+
.. include:: /includes/log-changes-to-database-profiler.rst
89+
8990
.. _database-profiling-specify-slowms-threshold:
9091

9192
Specify the Threshold for Slow Operations

0 commit comments

Comments
 (0)