summaryrefslogtreecommitdiff
path: root/src/mongo/db/ftdc/controller.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/ftdc/controller.h')
-rw-r--r--src/mongo/db/ftdc/controller.h15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/mongo/db/ftdc/controller.h b/src/mongo/db/ftdc/controller.h
index 44b5e838506..e73d570598d 100644
--- a/src/mongo/db/ftdc/controller.h
+++ b/src/mongo/db/ftdc/controller.h
@@ -62,8 +62,12 @@ public:
/*
* Set whether the controller is enabled, and collects data.
+ *
+ * Returns ErrorCodes::FTDCPathNotSet if no log path has been specified for FTDC. This occurs
+ * in MongoS in some situations since MongoS is not required to have a storage directory like
+ * MongoD does.
*/
- void setEnabled(bool enabled);
+ Status setEnabled(bool enabled);
/**
* Set the period for data collection.
@@ -94,6 +98,13 @@ public:
*/
void setMaxSamplesPerInterimMetricChunk(size_t size);
+ /*
+ * Set the path to store FTDC files if not already set.
+ *
+ * Returns ErrorCodes::FTDCPathAlreadySet if the path has already been set.
+ */
+ Status setDirectory(const boost::filesystem::path& path);
+
/**
* Add a metric collector to collect periodically. i.e., serverStatus
*/
@@ -172,7 +183,7 @@ private:
State _state{State::kNotStarted};
// Directory to store files
- const boost::filesystem::path _path;
+ boost::filesystem::path _path;
// Mutex to protect the condvar, configuration changes, and most recent periodic document.
stdx::mutex _mutex;