diff options
author | Davis Haupt <davis.haupt@mongodb.com> | 2023-03-20 21:31:46 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2023-03-20 22:28:55 +0000 |
commit | 5531212069bee2a38fff2e9c926b2748fdb6b523 (patch) | |
tree | 7296b423a673b14905e258ac704ea60ef2d61ccc /src/mongo/db/clientcursor.cpp | |
parent | 7a00cd0798725c1d635885788cff9729936f6456 (diff) | |
download | mongo-5531212069bee2a38fff2e9c926b2748fdb6b523.tar.gz |
SERVER-73494 Hook new shapification up to telemetry store for find command
Diffstat (limited to 'src/mongo/db/clientcursor.cpp')
-rw-r--r-- | src/mongo/db/clientcursor.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mongo/db/clientcursor.cpp b/src/mongo/db/clientcursor.cpp index b901cbef362..2899c038f91 100644 --- a/src/mongo/db/clientcursor.cpp +++ b/src/mongo/db/clientcursor.cpp @@ -157,7 +157,8 @@ void ClientCursor::dispose(OperationContext* opCtx, boost::optional<Date_t> now) } if (_telemetryStoreKey && opCtx) { - telemetry::writeTelemetry(opCtx, _telemetryStoreKey, _queryExecMicros, _docsReturned); + telemetry::writeTelemetry( + opCtx, _telemetryStoreKey, getOriginatingCommandObj(), _queryExecMicros, _docsReturned); } if (now) { @@ -397,7 +398,7 @@ void collectTelemetryMongod(OperationContext* opCtx, ClientCursorPin& pinnedCurs opDebug.nreturned); } -void collectTelemetryMongod(OperationContext* opCtx) { +void collectTelemetryMongod(OperationContext* opCtx, const BSONObj& originatingCommand) { auto&& opDebug = CurOp::get(opCtx)->debug(); // If we haven't registered a cursor to prepare for getMore requests, we record // telemetry directly. @@ -406,6 +407,7 @@ void collectTelemetryMongod(OperationContext* opCtx) { // additiveMetrics.queryExecMicros isn't set until curOp is closing out. telemetry::writeTelemetry(opCtx, opDebug.telemetryStoreKey, + originatingCommand, CurOp::get(opCtx)->elapsedTimeExcludingPauses().count(), opDebug.nreturned); } |