Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-5426

Reduce ambiguity between per-DB and instance-wide profiling

    • Type: Icon: Task Task
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • Server_Docs_20231030
    • Affects Version/s: None
    • Component/s: manual
    • Labels:
      None

      I understand now that

      1. The mongod process ensures instance-wide profiling by using the --profile command line argument or operationProfiling.mode config file setting and
      2. The db.setProfilingLevel() command only affects a single database

      but when I read http://docs.mongodb.org/manual/reference/configuration-options/ earlier I skipped to certain sections and the behaviour was ambiguous for a while

      At the top of the page you might read this:

      You can enable profiling on a per-database or per-instance basis.

      but then if you take the link to subsection "Enable Database Profiling and Set the Profiling Level" you will see the db-specific version only. At this stage if you don't know that the instance-wide profiling can only enabled with a startup option it's hard to figure out whether the db.setProfiling() command is talking about database-level or instance-level. I know it says "Database profiling" but the distinction between a single db namespace and a whole database server is routinely ignored in database manuals.

      In short, after arriving on page and both reading the summary at the top and then jumping to the section that looks relevant it was confusing whether the command was for one db or instance-wide.

      One idea I suggestion I have is to change:

      You can enable profiling on a per-database or per-instance basis.

      to

      "You can enable or disable profiling on per-database basis by using the db.setProfilingLevel command, or you can force it to be on for all databases in a mongod instance by using a startup option."

            Assignee:
            kay.kim@mongodb.com Kay Kim (Inactive)
            Reporter:
            akira.kurogane Akira Kurogane
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              6 years, 16 weeks, 6 days ago