config: remove telemetry:log-object-fetch-path

Summary: Looks like we never use this, thus let's simply remove it.

Differential Revision: D30454812

fbshipit-source-id: 28242a2144da4bab9d24debc1a60eeebcdcbaad5
This commit is contained in:
Xavier Deguillard 2021-08-23 11:03:41 -07:00 committed by Facebook GitHub Bot
parent 6f1f1ba653
commit 8a6c320d1e
2 changed files with 1 additions and 21 deletions

View File

@ -514,21 +514,8 @@ class EdenConfig : private ConfigSettingManager {
"",
this};
/**
* Legacy to be deleted, once all running eden's are compatible with
* log-object-fetch-path-regex.
* Controls which paths eden will log data fetches for when this is set (
* if logObjectFetchPathRegex is not set). Eden will only log paths which are
* subpaths of <checkout root>/<logObjectFetchPath>.
*/
ConfigSetting<std::optional<std::string>> logObjectFetchPath{
"telemetry:log-object-fetch-path",
std::nullopt,
this};
/**
* Controls which paths eden will log data fetches for when this is set.
* Takes precidence over logObjectFetchPath.
* Fetches for any paths that match the regex will be logged.
*/
ConfigSetting<std::optional<std::shared_ptr<RE2>>> logObjectFetchPathRegex{

View File

@ -494,11 +494,10 @@ void HgQueuedBackingStore::logBackingStoreFetch(
if (!config_) {
return;
}
auto& logFetchPath = config_->getEdenConfig()->logObjectFetchPath.getValue();
auto& logFetchPathRegex =
config_->getEdenConfig()->logObjectFetchPathRegex.getValue();
// If we are not logging at least one of these instances, early return
if (!(logFetchPath || logFetchPathRegex || isRecordingFetch_.load())) {
if (!(logFetchPathRegex || isRecordingFetch_.load())) {
return;
}
RelativePathPiece path = proxyHash.path();
@ -512,12 +511,6 @@ void HgQueuedBackingStore::logBackingStoreFetch(
path.stringPiece().str(), *logFetchPathRegex.value())) {
logger_->logImport(context, path, type);
}
} else if (logFetchPath) {
// TODO: remove once logFetchPathRegex is rolled out everywhere
if (RelativePathPiece(logFetchPath.value())
.isParentDirOf(RelativePathPiece(path))) {
logger_->logImport(context, path, type);
}
}
}