summaryrefslogtreecommitdiff
path: root/src/mongo/db/clientcursor.cpp
diff options
context:
space:
mode:
authorDavis Haupt <davis.haupt@mongodb.com>2023-05-09 16:21:45 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2023-05-09 20:50:26 +0000
commitb6eab7e7d83b10cef5c57f781c1751b465aade9f (patch)
tree73eb4abb778f4579ed98a012a9d201be6b27965e /src/mongo/db/clientcursor.cpp
parent32f706d8604e3045324584e6191f220df96d896d (diff)
downloadmongo-b6eab7e7d83b10cef5c57f781c1751b465aade9f.tar.gz
SERVER-75512 key telemetry store on hash rather than BSONObj
Diffstat (limited to 'src/mongo/db/clientcursor.cpp')
-rw-r--r--src/mongo/db/clientcursor.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mongo/db/clientcursor.cpp b/src/mongo/db/clientcursor.cpp
index a18b2fec45b..55e116e5893 100644
--- a/src/mongo/db/clientcursor.cpp
+++ b/src/mongo/db/clientcursor.cpp
@@ -124,6 +124,7 @@ ClientCursor::ClientCursor(ClientCursorParams params,
_planSummary(_exec->getPlanExplainer().getPlanSummary()),
_planCacheKey(CurOp::get(operationUsingCursor)->debug().planCacheKey),
_queryHash(CurOp::get(operationUsingCursor)->debug().queryHash),
+ _telemetryStoreKeyHash(CurOp::get(operationUsingCursor)->debug().telemetryStoreKeyHash),
_telemetryStoreKey(CurOp::get(operationUsingCursor)->debug().telemetryStoreKey),
_telemetryRequestShapifier(
std::move(CurOp::get(operationUsingCursor)->debug().telemetryRequestShapifier)),
@@ -160,8 +161,9 @@ void ClientCursor::dispose(OperationContext* opCtx, boost::optional<Date_t> now)
return;
}
- if (_telemetryStoreKey && opCtx) {
+ if (_telemetryStoreKeyHash && opCtx) {
telemetry::writeTelemetry(opCtx,
+ _telemetryStoreKeyHash,
_telemetryStoreKey,
std::move(_telemetryRequestShapifier),
_metrics.executionTime.value_or(Microseconds{0}).count(),
@@ -406,6 +408,7 @@ void collectTelemetryMongod(OperationContext* opCtx,
auto& opDebug = CurOp::get(opCtx)->debug();
telemetry::writeTelemetry(
opCtx,
+ opDebug.telemetryStoreKeyHash,
opDebug.telemetryStoreKey,
std::move(requestShapifier),
opDebug.additiveMetrics.executionTime.value_or(Microseconds{0}).count(),