diff options
author | Will Buerger <will.buerger@mongodb.com> | 2023-05-05 13:36:36 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2023-05-05 16:42:44 +0000 |
commit | 72e24ba9bbc1c3043d35d47e30cda75075ff3d95 (patch) | |
tree | 4673ecbe265e23f3a01cac1e187c0290c71110a3 /src/mongo/db/commands | |
parent | d66daf618a9005eaba4a8c9fa3746ef27ab80427 (diff) | |
download | mongo-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.cpp | 10 | ||||
-rw-r--r-- | src/mongo/db/commands/run_aggregate.cpp | 2 |
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. |