summaryrefslogtreecommitdiff
path: root/src/mongo/db/commands
diff options
context:
space:
mode:
authorWill Buerger <will.buerger@mongodb.com>2023-05-05 13:36:36 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2023-05-05 16:42:44 +0000
commit72e24ba9bbc1c3043d35d47e30cda75075ff3d95 (patch)
tree4673ecbe265e23f3a01cac1e187c0290c71110a3 /src/mongo/db/commands
parentd66daf618a9005eaba4a8c9fa3746ef27ab80427 (diff)
downloadmongo-72e24ba9bbc1c3043d35d47e30cda75075ff3d95.tar.gz
SERVER-76557: Keep RequestShapifiers in telemetry store
Diffstat (limited to 'src/mongo/db/commands')
-rw-r--r--src/mongo/db/commands/find_cmd.cpp10
-rw-r--r--src/mongo/db/commands/run_aggregate.cpp2
2 files changed, 6 insertions, 6 deletions
diff --git a/src/mongo/db/commands/find_cmd.cpp b/src/mongo/db/commands/find_cmd.cpp
index add8ceb3d57..2b6d5cb9dc8 100644
--- a/src/mongo/db/commands/find_cmd.cpp
+++ b/src/mongo/db/commands/find_cmd.cpp
@@ -563,11 +563,11 @@ public:
if (collection) {
// Collect telemetry. Exclude queries against collections with encrypted fields.
if (!collection.get()->getCollectionOptions().encryptedFieldConfig) {
- telemetry::registerRequest(
- telemetry::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());
}
}
diff --git a/src/mongo/db/commands/run_aggregate.cpp b/src/mongo/db/commands/run_aggregate.cpp
index 4b2c535cbc7..8a2d675982d 100644
--- a/src/mongo/db/commands/run_aggregate.cpp
+++ b/src/mongo/db/commands/run_aggregate.cpp
@@ -1226,7 +1226,7 @@ Status runAggregate(OperationContext* opCtx,
if (keepCursor) {
collectTelemetryMongod(opCtx, pins[0]);
} else {
- collectTelemetryMongod(opCtx, cmdObj);
+ collectTelemetryMongod(opCtx, std::move(curOp->debug().telemetryRequestShapifier));
}
// For an optimized away pipeline, signal the cache that a query operation has completed.