summaryrefslogtreecommitdiff
path: root/src/mongo/db/commands
diff options
context:
space:
mode:
authorliubov.molchanova <liubov.molchanova@mongodb.com>2023-05-17 08:16:48 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2023-05-17 10:20:42 +0000
commit87160f876c6fb94f5d03062b2caee57539ec5d8e (patch)
treeb78d9ca9e853a236e0a2f6432a6ac02dc50119cd /src/mongo/db/commands
parent1c390a0c50104a04cbd8ecbefb99eaf22e1bc914 (diff)
downloadmongo-87160f876c6fb94f5d03062b2caee57539ec5d8e.tar.gz
Revert "SERVER-76427: Rename $telemetry to $queryStats"
This reverts commit d646e44b7801a3e5b3230bbae7dcfe05a5ed8707.
Diffstat (limited to 'src/mongo/db/commands')
-rw-r--r--src/mongo/db/commands/find_cmd.cpp21
-rw-r--r--src/mongo/db/commands/getmore_cmd.cpp2
-rw-r--r--src/mongo/db/commands/run_aggregate.cpp18
3 files changed, 20 insertions, 21 deletions
diff --git a/src/mongo/db/commands/find_cmd.cpp b/src/mongo/db/commands/find_cmd.cpp
index 983661fbd15..90e6fa15ca1 100644
--- a/src/mongo/db/commands/find_cmd.cpp
+++ b/src/mongo/db/commands/find_cmd.cpp
@@ -55,7 +55,7 @@
#include "mongo/db/query/find_request_shapifier.h"
#include "mongo/db/query/get_executor.h"
#include "mongo/db/query/query_knobs_gen.h"
-#include "mongo/db/query/query_stats.h"
+#include "mongo/db/query/telemetry.h"
#include "mongo/db/repl/replication_coordinator.h"
#include "mongo/db/s/query_analysis_writer.h"
#include "mongo/db/service_context.h"
@@ -561,14 +561,13 @@ public:
cq->setUseCqfIfEligible(true);
if (collection) {
- // Collect queryStats. Exclude queries against collections with encrypted fields.
+ // Collect telemetry. Exclude queries against collections with encrypted fields.
if (!collection.get()->getCollectionOptions().encryptedFieldConfig) {
- query_stats::registerRequest(
- std::make_unique<query_stats::FindRequestShapifier>(
- cq->getFindCommandRequest(), opCtx),
- collection.get()->ns(),
- opCtx,
- cq->getExpCtx());
+ telemetry::registerRequest(std::make_unique<telemetry::FindRequestShapifier>(
+ cq->getFindCommandRequest(), opCtx),
+ collection.get()->ns(),
+ opCtx,
+ cq->getExpCtx());
}
}
@@ -781,9 +780,9 @@ public:
processFLEFindD(
opCtx, findCommand->getNamespaceOrUUID().nss().value(), findCommand.get());
}
- // Set the queryStatsStoreKey to none so queryStats isn't collected when we've done
- // a FLE rewrite.
- CurOp::get(opCtx)->debug().queryStatsStoreKeyHash = boost::none;
+ // Set the telemetryStoreKey to none so telemetry isn't collected when we've done a
+ // FLE rewrite.
+ CurOp::get(opCtx)->debug().telemetryStoreKeyHash = boost::none;
CurOp::get(opCtx)->debug().shouldOmitDiagnosticInformation = true;
}
diff --git a/src/mongo/db/commands/getmore_cmd.cpp b/src/mongo/db/commands/getmore_cmd.cpp
index 54035c99829..8f91862d002 100644
--- a/src/mongo/db/commands/getmore_cmd.cpp
+++ b/src/mongo/db/commands/getmore_cmd.cpp
@@ -703,7 +703,7 @@ public:
metricsCollector.incrementDocUnitsReturned(curOp->getNS(), docUnitsReturned);
curOp->debug().additiveMetrics.nBatches = 1;
curOp->setEndOfOpMetrics(numResults);
- collectQueryStatsMongod(opCtx, cursorPin);
+ collectTelemetryMongod(opCtx, cursorPin);
if (respondWithId) {
cursorDeleter.dismiss();
diff --git a/src/mongo/db/commands/run_aggregate.cpp b/src/mongo/db/commands/run_aggregate.cpp
index 0bc7d7f6415..a290ef56713 100644
--- a/src/mongo/db/commands/run_aggregate.cpp
+++ b/src/mongo/db/commands/run_aggregate.cpp
@@ -76,7 +76,7 @@
#include "mongo/db/query/query_feature_flags_gen.h"
#include "mongo/db/query/query_knobs_gen.h"
#include "mongo/db/query/query_planner_common.h"
-#include "mongo/db/query/query_stats.h"
+#include "mongo/db/query/telemetry.h"
#include "mongo/db/read_concern.h"
#include "mongo/db/repl/oplog.h"
#include "mongo/db/repl/read_concern_args.h"
@@ -836,11 +836,11 @@ Status runAggregate(OperationContext* opCtx,
};
auto registerTelemetry = [&]() -> void {
- // Register queryStats. Exclude queries against collections with encrypted fields.
- // We still collect queryStats on collection-less aggregations.
+ // Register telemetry. Exclude queries against collections with encrypted fields.
+ // We still collect telemetry on collection-less aggregations.
if (!(ctx && ctx->getCollection() &&
ctx->getCollection()->getCollectionOptions().encryptedFieldConfig)) {
- query_stats::registerAggRequest(request, opCtx);
+ telemetry::registerAggRequest(request, opCtx);
}
};
@@ -1051,9 +1051,9 @@ Status runAggregate(OperationContext* opCtx,
request.getEncryptionInformation()->setCrudProcessed(true);
}
- // Set the queryStatsStoreKey to none so queryStats isn't collected when we've done a
- // FLE rewrite.
- CurOp::get(opCtx)->debug().queryStatsStoreKeyHash = boost::none;
+ // Set the telemetryStoreKey to none so telemetry isn't collected when we've done a FLE
+ // rewrite.
+ CurOp::get(opCtx)->debug().telemetryStoreKeyHash = boost::none;
}
pipeline->optimizePipeline();
@@ -1223,9 +1223,9 @@ Status runAggregate(OperationContext* opCtx,
curOp->setEndOfOpMetrics(stats.nReturned);
if (keepCursor) {
- collectQueryStatsMongod(opCtx, pins[0]);
+ collectTelemetryMongod(opCtx, pins[0]);
} else {
- collectQueryStatsMongod(opCtx, std::move(curOp->debug().queryStatsRequestShapifier));
+ collectTelemetryMongod(opCtx, std::move(curOp->debug().telemetryRequestShapifier));
}
// For an optimized away pipeline, signal the cache that a query operation has completed.